Skip to content

Commit 575c107

Browse files
committed
Align jest config/tsconfig
1 parent 7b4dad4 commit 575c107

File tree

5 files changed

+17
-31
lines changed

5 files changed

+17
-31
lines changed

.github/workflows/prep-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545

4646
- name: "** Next Step **"
4747
run: |
48-
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"
48+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"

.github/workflows/publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
if: ${{ failure() }}
5555
run: |
5656
echo "Failed to Publish the Draft Release Url:"
57-
echo ${{ steps.populate-release.outputs.release_url }}
57+
echo ${{ steps.populate-release.outputs.release_url }}

jest.config.js

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,28 @@
11
const jestJupyterLab = require('@jupyterlab/testutils/lib/jest-config');
22

33
const esModules = [
4+
'@codemirror',
5+
'@jupyter/ydoc',
46
'@jupyterlab/',
57
'lib0',
6-
'y\\-protocols',
7-
'y\\-websocket',
8+
'nanoid',
9+
'vscode-ws-jsonrpc',
10+
'y-protocols',
11+
'y-websocket',
812
'yjs'
913
].join('|');
1014

11-
const jlabConfig = jestJupyterLab(__dirname);
12-
13-
const {
14-
moduleFileExtensions,
15-
moduleNameMapper,
16-
preset,
17-
setupFilesAfterEnv,
18-
setupFiles,
19-
testPathIgnorePatterns,
20-
transform
21-
} = jlabConfig;
15+
const baseConfig = jestJupyterLab(__dirname);
2216

2317
module.exports = {
24-
moduleFileExtensions,
25-
moduleNameMapper,
26-
preset,
27-
setupFilesAfterEnv,
28-
setupFiles,
29-
testPathIgnorePatterns,
30-
transform,
18+
...baseConfig,
3119
automock: false,
3220
collectCoverageFrom: [
3321
'src/**/*.{ts,tsx}',
3422
'!src/**/*.d.ts',
3523
'!src/**/.ipynb_checkpoints/*'
3624
],
37-
coverageDirectory: 'coverage',
3825
coverageReporters: ['lcov', 'text'],
39-
globals: {
40-
'ts-jest': {
41-
tsconfig: 'tsconfig.json'
42-
}
43-
},
4426
testRegex: 'src/.*/.*.spec.ts[x]?$',
4527
transformIgnorePatterns: [`/node_modules/(?!${esModules}).+`]
4628
};

tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"],
22-
"skipLibCheck": true
20+
"target": "ES2018"
2321
},
2422
"include": ["src/*"]
2523
}

tsconfig.test.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig",
3+
"compilerOptions": {
4+
"types": ["jest"]
5+
}
6+
}

0 commit comments

Comments
 (0)