Skip to content

Commit 25f92ad

Browse files
committed
use central jest config in browser package
1 parent f598c52 commit 25f92ad

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
'^.+\\.ts$': 'ts-jest',
66
'^.+\\.tsx$': 'ts-jest',
77
},
8+
coverageDirectory: '<rootDir>/coverage',
89
moduleFileExtensions: ['js', 'ts', 'tsx'],
910
testEnvironment: 'node',
1011
testMatch: ['<rootDir>/**/*.test.ts', '<rootDir>/**/*.test.tsx'],

packages/browser/jest.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const baseConfig = require('../../jest.config.js');
2+
3+
module.exports = {
4+
...baseConfig,
5+
testEnvironment: 'jsdom',
6+
testMatch: ['<rootDir>/test/unit/**/*.test.ts'],
7+
};

packages/browser/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@
7272
"size:check:es5": "cat build/bundles/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES5: \",$1,\"kB\";}'",
7373
"size:check:es6": "cat build/bundles/bundle.es6.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES6: \",$1,\"kB\";}'",
7474
"test": "run-s test:unit",
75-
"test:unit": "jest --config test/unit/jest.config.js",
75+
"test:unit": "jest",
7676
"test:integration": "test/integration/run.js",
7777
"test:integration:checkbrowsers": "node scripts/checkbrowsers.js",
7878
"test:package": "node test/package/npm-build.js && rm test/package/tmp.js",
79-
"test:unit:watch": "jest --config test/unit/jest.config.js --watch",
79+
"test:unit:watch": "jest --watch",
8080
"test:integration:watch": "test/integration/run.js --watch"
8181
},
8282
"volta": {

packages/browser/test/unit/jest.config.js

-16
This file was deleted.

0 commit comments

Comments
 (0)