Commit e97395d
Improve TS instructions (jestjs#3414)
The regex for TS transformer in the doc is too broad. For example, I set
the regex to `".(ts|tsx)"` as recommended in the docs and my test would
fail. The reason is that one of my tested file imports the file `isArguments.js`
from `lodash-es` (ES 2015 build of lodash). Because `isArguments.js` matches the pattern
`.(ts|tsx)`, this file is not transpiled by babel (even after I've set
`transformIgnorePatterns` to `"<rootDir>/node_modules/(?!lodash-es)"`.
Changing the pattern to `"^.+\\.tsx?$"` fixes this problem.1 parent 057ba3a commit e97395d
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments