|
@@ -1,6 +1,6 @@
|
|
|
import path = require('path');
|
|
|
|
|
|
-module.exports = function(name: string, baseDir: string) {
|
|
|
+module.exports = function(baseDir: string) {
|
|
|
return {
|
|
|
preset: 'ts-jest/presets/js-with-babel',
|
|
|
moduleNameMapper: {
|
|
@@ -8,24 +8,19 @@ module.exports = function(name: string, baseDir: string) {
|
|
|
'\\.(gif|ttf|eot)$': '@jupyterlab/testutils/lib/jest-file-mock.js'
|
|
|
},
|
|
|
transform: {
|
|
|
- '\\.svg$': 'jest-raw-loader'
|
|
|
+ '\\.svg$': 'jest-raw-loader',
|
|
|
+ '^.+\\.md?$': 'markdown-loader-jest'
|
|
|
},
|
|
|
setupFiles: ['@jupyterlab/testutils/lib/jest-shim.js'],
|
|
|
- testPathIgnorePatterns: ['/dev_mode/', '/lib/', '/node_modules/'],
|
|
|
+ testPathIgnorePatterns: ['/lib/', '/node_modules/'],
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
|
- rootDir: path.resolve(path.join(baseDir, '..', '..')),
|
|
|
reporters: ['default', 'jest-junit'],
|
|
|
- collectCoverageFrom: [
|
|
|
- `packages/${name}/src/**.{ts,tsx}`,
|
|
|
- `!packages/${name}/src/*.d.ts`
|
|
|
- ],
|
|
|
- testTimeout: 20000,
|
|
|
coverageReporters: ['json', 'lcov', 'text', 'html'],
|
|
|
coverageDirectory: path.join(baseDir, 'coverage'),
|
|
|
- testRegex: `tests\/test-${name}\/src\/.*\.spec\.tsx?$`,
|
|
|
+ testRegex: '/test/.*.spec.ts[x]?$',
|
|
|
globals: {
|
|
|
'ts-jest': {
|
|
|
- tsConfig: `./tsconfig.json`
|
|
|
+ tsConfig: `./tsconfig.test.json`
|
|
|
}
|
|
|
}
|
|
|
};
|