Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fixes tests on Windows using Unix-style path #1420

Merged
merged 3 commits into from Oct 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions commitlint.config.js
@@ -1,6 +1,7 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [0, 'always', Infinity],
'footer-max-line-length': [1, 'always'],
},
}
2 changes: 1 addition & 1 deletion src/utils/internal/getCallFrame.ts
@@ -1,5 +1,5 @@
// Ignore the source files traces for local testing.
const SOURCE_FRAME = /\/msw\/src\/(.+)/
const SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/

const BUILD_FRAME =
/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/
Expand Down
2 changes: 1 addition & 1 deletion test/msw-api/cli/init.test.ts
Expand Up @@ -161,7 +161,7 @@ test('does not produce eslint errors or warnings', async () => {
expect(init.stderr).toEqual('')

const eslint = await promisifyChildProcess(
exec(`node_modules/.bin/eslint ${fsMock.resolve()}`),
exec(path.resolve(`node_modules/.bin/eslint ${fsMock.resolve()}`)),
)
expect(eslint.stdout).toEqual('')
expect(eslint.stderr).toEqual('')
Expand Down