Skip to content

Conversation

@LeaVerou
Copy link
Member

@LeaVerou LeaVerou commented Dec 2, 2025

  • Run into issues with Prism Live CSS
  • Error with failing tests, ping @DmitrySharabin as the trace goes inside some of your code!

- Run into issues with Prism Live CSS
- Error with failing tests, ping @DmitrySharabin as the trace goes inside some of your code!
@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for h-test ready!

Name Link
🔨 Latest commit 08009b4
🔍 Latest deploy log https://app.netlify.com/projects/h-test/deploys/692f40aa6dade20008fd13b4
😎 Deploy Preview https://deploy-preview-103--h-test.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@DmitrySharabin
Copy link
Member

DmitrySharabin commented Dec 2, 2025

  • Error with failing tests, ping @DmitrySharabin as the trace goes inside some of your code!

It's the last test with expect: undefined that causes it. The issue is related to the way we stringify undefined. Our code expects it to be a string (well, it should, according to its name and all the rest of the code), but it's always undefined:

let expectString = stringify(expect);

export function stringify (obj, options = {}) {

It seems to me we might have the same issue with null. I wonder if we should do the same as we already do with NaN (stringify it to "NaN") and return "undefined" and "null"?

If we don't stringify undefined correctly, we'll get incorrect output as well (see the last test where there's no expected value):
image

@LeaVerou
Copy link
Member Author

LeaVerou commented Dec 2, 2025

Yes, stringifying to "undefined" seems reasonable. Same for null.

@DmitrySharabin
Copy link
Member

Yes, stringifying to "undefined" seems reasonable. Same for null.

Here is the fix: #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants