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:
Philipp Rudloff
2022-10-02 00:40:39 +02:00
committed by GitHub
co-authored by Artem Zakharchenko
parent fb115c16ac
commit 8f65d19c4f
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -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 -1
View File
@@ -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)[\/\\]|^[^\/\\]*$/
+1 -1
View File
@@ -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('')