@@ -22,11 +22,29 @@ const esModules = [
2222
2323module . exports = function ( baseDir : string ) {
2424 return {
25- testEnvironment : '@jupyterlab/testing/lib/jest-env.js' ,
25+ coverageReporters : [ 'json' , 'lcov' , 'text' , 'html' ] ,
26+ coverageDirectory : path . join ( baseDir , 'coverage' ) ,
27+ moduleFileExtensions : [
28+ 'ts' ,
29+ 'tsx' ,
30+ 'js' ,
31+ 'jsx' ,
32+ 'json' ,
33+ 'node' ,
34+ 'mjs' ,
35+ 'cjs'
36+ ] ,
2637 moduleNameMapper : {
2738 '\\.(css|less|sass|scss)$' : 'identity-obj-proxy' ,
2839 '\\.(gif|ttf|eot)$' : '@jupyterlab/testing/lib/jest-file-mock.js'
2940 } ,
41+ reporters : [ 'default' , 'jest-junit' , 'github-actions' ] ,
42+ resolver : '@jupyterlab/testing/lib/jest-resolver.js' ,
43+ setupFiles : [ '@jupyterlab/testing/lib/jest-shim.js' ] ,
44+ testEnvironment : '@jupyterlab/testing/lib/jest-env.js' ,
45+ testPathIgnorePatterns : [ '/lib/' , '/node_modules/' ] ,
46+ testRegex : '/test/.*.spec.ts[x]?$' ,
47+ testTimeout : 10000 ,
3048 transform : {
3149 '\\.svg$' : '@jupyterlab/testing/lib/jest-raw-loader.js' ,
3250 // Extracted from https://github.com/kulshekhar/ts-jest/blob/v29.0.3/presets/index.js
@@ -38,23 +56,6 @@ module.exports = function (baseDir: string) {
3856 ] ,
3957 '^.+\\.jsx?$' : 'babel-jest'
4058 } ,
41- testTimeout : 10000 ,
42- setupFiles : [ '@jupyterlab/testing/lib/jest-shim.js' ] ,
43- testPathIgnorePatterns : [ '/lib/' , '/node_modules/' ] ,
44- moduleFileExtensions : [
45- 'ts' ,
46- 'tsx' ,
47- 'js' ,
48- 'jsx' ,
49- 'json' ,
50- 'node' ,
51- 'mjs' ,
52- 'cjs'
53- ] ,
54- transformIgnorePatterns : [ `/node_modules/(?!${ esModules } ).+` ] ,
55- reporters : [ 'default' , 'jest-junit' , 'github-actions' ] ,
56- coverageReporters : [ 'json' , 'lcov' , 'text' , 'html' ] ,
57- coverageDirectory : path . join ( baseDir , 'coverage' ) ,
58- testRegex : '/test/.*.spec.ts[x]?$'
59+ transformIgnorePatterns : [ `/node_modules/(?!${ esModules } ).+` ]
5960 } ;
6061} ;
0 commit comments