Skip to content

Commit 19a9c62

Browse files
Samuel  TranSamuel  Tran
authored andcommitted
Added transformignorepatterns to jest config to allow importing d3 in History.test.ts
Trying to import d3 for history test case. Passed in terminal
1 parent 7c4c656 commit 19a9c62

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"transform": {
66
"^.+\\.(js|ts|tsx)$": "ts-jest"
77
},
8+
"transformIgnorePatterns": ["/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)"],
89
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
910
"moduleFileExtensions": [
1011
"ts",
@@ -93,6 +94,7 @@
9394
"@testing-library/jest-dom": "^4.2.4",
9495
"@types/chai": "^4.2.14",
9596
"@types/chrome": "^0.0.119",
97+
"@types/d3": "^7.4.0",
9698
"@types/d3-scale-chromatic": "^2.0.0",
9799
"@types/jest": "^26.0.4",
98100
"@types/lodash.isequal": "^4.5.5",

0 commit comments

Comments
 (0)