From 510262a6a94664bd871212904b80c22a36f7b71a Mon Sep 17 00:00:00 2001 From: Henric Trotzig Date: Thu, 5 Jan 2017 10:30:20 +0100 Subject: [PATCH] Don't exlude node-modules from being transformed for Jest 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. --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ba7743..39886fb 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "worker-loader": "^0.7.1" }, "jest": { - "testRegex": "/__tests__/.*-test.(js|jsx)$" + "testRegex": "/__tests__/.*-test.(js|jsx)$", + "transformIgnorePatterns": [] } }