Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Don't exlude node-modules from being transformed for Jest
Browse files Browse the repository at this point in the history
We were seeing this error when running tests in Node <= 5:

  SyntaxError: Unexpected token ...

This error was coming from trying to parse this file
node_modules/selenium-webdriver/lib/http.js

  function toExecuteAtomCommand(command, atom, ...params) {

According to the readme, node 4 and 5 are supported, which makes me a
little confused about having to transform them using babel.

https://www.npmjs.com/package/selenium-webdriver#node-support-policy

Tests seem to run a little slower after this change, but only on the
first run.
  • Loading branch information
trotzig committed Jan 5, 2017
1 parent 59c6e3b commit 510262a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"worker-loader": "^0.7.1"
},
"jest": {
"testRegex": "/__tests__/.*-test.(js|jsx)$"
"testRegex": "/__tests__/.*-test.(js|jsx)$",
"transformIgnorePatterns": []
}
}

0 comments on commit 510262a

Please sign in to comment.