Skip to content

Commit

Permalink
Fix tests using the idea of @lukejagodzinski from jestjs/jest#6229
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Jul 4, 2019
1 parent 1f10b94 commit 4bbcaa6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jest.config.js
Expand Up @@ -2,17 +2,20 @@ const func = require('@jupyterlab/testutils/lib/jest-config');
const upstream = func('jupyterlab_go_to_definition', __dirname);

const reuseFromUpstream = [
'preset',
'moduleNameMapper',
'setupFilesAfterEnv',
'setupFiles',
'testPathIgnorePatterns',
'moduleFileExtensions',
];

let local = {
globals: { 'ts-jest': { tsConfig: 'tsconfig.json' } },
testRegex: `.*\.spec\.tsx?$`,
transform: {
"\\.(ts|tsx)?$": "ts-jest",
"\\.(js|jsx)?$": "./transform.js"
},
transformIgnorePatterns: ["/node_modules/(?!(@jupyterlab/.*)/)"]
};

for(option of reuseFromUpstream) {
Expand Down
2 changes: 2 additions & 0 deletions transform.js
@@ -0,0 +1,2 @@
const config = require("./babel.config.js")
module.exports = require("babel-jest").createTransformer(config);

0 comments on commit 4bbcaa6

Please sign in to comment.