KEMBAR78
chore: add windows to CI by styfle · Pull Request #896 · vercel/ncc · GitHub
Skip to content

Conversation

@styfle
Copy link
Member

@styfle styfle commented Mar 25, 2022

@styfle
Copy link
Member Author

styfle commented Mar 25, 2022

@yichi-yang Any thoughts what could be wrong here? Looks like the tests already strip \r but its still showing up

ncc/test/unit.test.js

Lines 22 to 23 in 905222e

// Windows support
.replace(/\r/g, "");

@yichi-yang
Copy link

@yichi-yang Any thoughts what could be wrong here? Looks like the tests already strip \r but its still showing up

I'm not super familiar with the unit test setup here, but just by looking at the code my guess would be it's actualSourceMap that contain \rs?

expect(actualSourceMap).toBe(expectedSourceMap);

@styfle
Copy link
Member Author

styfle commented Mar 25, 2022

That one also has a replace, so still not sure why it fails CI 🤔

ncc/test/unit.test.js

Lines 76 to 79 in 905222e

const actualSourceMap = map
.trim()
// Windows support
.replace(/\r/g, "");

@yichi-yang
Copy link

Ah I think you need /\\r/g instead of /\r/g. Those \rs in map appear to already have been escaped.

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.

2 participants