mirror of
https://github.com/hanzoai/msw.git
synced 2026-09-24 17:00:34 +00:00
chore: fixes tests on Windows using Unix-style path (#1420)
* chore: allows longer commit body Changes the commitlint configuration to allow commit bodies of any length. * chore: fixes tests on Windows using Unix-style path Fixes a test passing a Unix-style path to child_process.exec which failed on Windows by wrapping it in `path.resolve`. Fixes a test relying on some internal logic which only took Unix-style paths into account. Co-authored-by: Artem Zakharchenko <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Artem Zakharchenko
parent
fb115c16ac
commit
8f65d19c4f
@@ -1,6 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
'body-max-line-length': [0, 'always', Infinity],
|
||||
'footer-max-line-length': [1, 'always'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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)[\/\\]|^[^\/\\]*$/
|
||||
|
||||
@@ -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('')
|
||||
|
||||
Reference in New Issue
Block a user