failing when running jest tests
mabellLU opened this issue · comments
getting this error:
export var $$iterator = SYMBOL_ITERATOR || '@@iterator'
^^^^^^
SyntaxError: Unexpected token export
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:305:17)
at Object.<anonymous> (node_modules/graphql-tools/dist/stitching/observableToAsyncIterable.js:46:17)
at Object.<anonymous> (node_modules/graphql-tools/dist/stitching/makeRemoteExecutableSchema.js:45:35)
Thanks for the report - could you share more about the environment you had set up which resulted in this issue?
Seems like the same issue as graphql/graphql-js#1248
Looks like this is an issue with projects started with create-react-app
and I've opened facebook/create-react-app#4085 to solve for it.
I'll keep this issue open to track progress.
If your project is built with Create React App and not ejected, react-scripts@1.1.2
should fix this.
Here is how to upgrade:
https://github.com/facebook/create-react-app/releases/tag/v1.1.2
Otherwise you can apply a similar fix yourself in your project config. Cheers!