Skip to content

Commit 4edc0f4

Browse files
authored
fix: refactored Jest test execution on CI (#93)
* fix: jest run all tests in the same run Closes #46 * feat: cleanup * fix: t * fix: coverage
1 parent 1165521 commit 4edc0f4

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed
File renamed without changes.
File renamed without changes.

jest.config.e2e.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: './lib/PlaywrightEnvironment.js',
4+
testPathIgnorePatterns: ['/node_modules/', 'lib'],
5+
testMatch: ['**/e2e/**/*.test.ts'],
6+
}

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
preset: 'ts-jest',
3-
testEnvironment: './lib/PlaywrightEnvironment.js',
43
testPathIgnorePatterns: ['/node_modules/', 'lib'],
4+
testMatch: ['**/src/**/*.test.ts'],
55
collectCoverage: true,
66
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
"format": "prettier --write \"*.{js,md}\" \"src/**/*.js\"",
3030
"lint": "tsc --noEmit && eslint . --ext .js,.ts",
3131
"prepublishOnly": "npm run build",
32-
"test": "jest src/bin/utils.test.ts tests/stub.test.ts && jest src/utils.test.ts",
32+
"test": "npm run test:src && npm run test:e2e",
33+
"test:src": "jest",
34+
"test:e2e": "jest -c jest.config.e2e.js",
3335
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls"
3436
},
3537
"husky": {

0 commit comments

Comments
 (0)