Skip to content

Commit a7ed31c

Browse files
committed
Fix jest configuration
1 parent 11351e9 commit a7ed31c

File tree

7 files changed

+911
-3387
lines changed

7 files changed

+911
-3387
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ node_modules/
132132
tests/package-lock.json
133133
javascript/tsconfig.tsbuildinfo
134134
javascript/.eslintcache
135+
javascript/coverage/

javascript/babel.config.cjs

Lines changed: 0 additions & 17 deletions
This file was deleted.

javascript/jest.config.cjs

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,10 @@
33
* Distributed under the terms of the Modified BSD License.
44
*/
55

6-
const path = require('path');
76
const esModules = ['lib0', 'y-protocols', 'y-websocket', 'yjs'].join('|');
87

98
module.exports = {
10-
preset: 'ts-jest/presets/js-with-babel',
11-
testTimeout: 10000,
12-
testPathIgnorePatterns: ['/lib/', '/node_modules/'],
13-
moduleFileExtensions: [
14-
'ts',
15-
'tsx',
16-
'js',
17-
'jsx',
18-
'json',
19-
'node',
20-
'mjs',
21-
'cjs'
22-
],
23-
transformIgnorePatterns: [`/node_modules/(?!${esModules}).+`],
24-
reporters: ['default'],
25-
coverageReporters: ['json', 'lcov', 'text', 'html'],
26-
coverageDirectory: path.join(__dirname, 'coverage'),
27-
testRegex: '/test/.*.spec.ts[x]?$',
28-
globals: {
29-
'ts-jest': {
30-
tsconfig: `./tsconfig.test.json`
31-
}
32-
}
33-
};
9+
testEnvironment: 'node',
10+
testRegex: 'lib/test/.*.spec.js[x]?$',
11+
12+
};

javascript/package.json

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,17 @@
4747
"yjs": "^13.5.40"
4848
},
4949
"devDependencies": {
50-
"@babel/core": "^7.10.2",
51-
"@babel/preset-env": "^7.10.2",
52-
"@types/jest": "^26.0.10",
53-
"@typescript-eslint/eslint-plugin": "~5.28.0",
54-
"@typescript-eslint/parser": "~5.28.0",
55-
"eslint": "~8.17.0",
56-
"eslint-config-prettier": "~8.5.0",
57-
"eslint-plugin-jest": "~26.5.3",
58-
"eslint-plugin-prettier": "~4.0.0",
59-
"eslint-plugin-react": "~7.29.4",
60-
"jest": "^26.4.2",
61-
"prettier": "~2.6.0",
62-
"rimraf": "~3.0.0",
63-
"ts-jest": "^26.3.0",
64-
"typescript": "~4.7.3"
50+
"@types/jest": "^29.0.0",
51+
"@typescript-eslint/eslint-plugin": "^5.36.0",
52+
"@typescript-eslint/parser": "^5.36.0",
53+
"eslint": "^8.17.0",
54+
"eslint-config-prettier": "^8.5.0",
55+
"eslint-plugin-jest": "^27.0.0",
56+
"eslint-plugin-prettier": "^4.0.0",
57+
"jest": "^29.0.0",
58+
"prettier": "^2.6.0",
59+
"rimraf": "^3.0.0",
60+
"typescript": "^4.8.0"
6561
},
6662
"publishConfig": {
6763
"access": "public"

0 commit comments

Comments
 (0)