Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Jest: compile less files than before
Browse files Browse the repository at this point in the history
In c78a955, we compiled some files in
node modules to fix a strange error. The solution I used was based on a
SO post here:
https://stackoverflow.com/questions/49263429/jest-gives-an-error-syntaxerror-unexpected-token-export

This was needed because Jest doesn't compile everything like webpack
does when we run `npm start` on this repo. A file in `ifixit/localize`
was using ES6 export syntax. When Jest tried to run this file, it failed
on this export statement (since it was never compiled). Let's change the
regex in `transformIgnorePatters` to only ignore the files in node
modules that aren't in the `ifixit/localize` repo.
  • Loading branch information
zdmitchell committed Mar 30, 2020
1 parent 21e54b9 commit 31e2d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -53,7 +53,7 @@
},
"jest": {
"transformIgnorePatterns": [
"node_modules/(?!@ngrx|(?!deck.gl)|ng-dynamic)"
"node_modules/(?!@ifixit/localize)"
]
}
}

0 comments on commit 31e2d32

Please sign in to comment.