Skip to content

Commit 8383802

Browse files
jonenstsBouzols
andauthored
fix jest transpiling all node modules, make tests fast again (#522)
the previous regexp is bugged, it requires '//' in the filename !! As a result, all the files in node_modules don't pass the regex so nothing is ignored => everything is transformed jest caches this in /tmp/jest_* so rerunning tests is fast, but the first time jest takes minutes to transform everything also the previous regex was incomplete (missing other files that need transforming) but this was not visible because it transformed everything anayway use the same regex as gridstudy gridexplore for consistency... Co-authored-by: Sylvain Bouzols <[email protected]>
1 parent d8abb96 commit 8383802

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jest.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const config: Config = {
1414
'^.+\\.(css|less|scss)$': 'identity-obj-proxy',
1515
},
1616
// see https://github.com/react-dnd/react-dnd/issues/3443
17-
transformIgnorePatterns: ['node_modules/(?!react-dnd)/'],
17+
transformIgnorePatterns: [
18+
'node_modules/(?!react-dnd|dnd-core|@react-dnd)',
19+
], // transform from ESM
1820
globals: {
1921
IS_REACT_ACT_ENVIRONMENT: true,
2022
},

0 commit comments

Comments
 (0)