Error on running jest tests
See original GitHub issue /Users/user/dir/node_modules/static-container/StaticContainer.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import React, { Component, Children, PropTypes } from 'react';
^^^^^^
SyntaxError: Unexpected token import
at transformAndBuildScript (node_modules/jest-runtime/build/transform.js:320:12)
at Object.<anonymous> (node_modules/react-native-root-siblings/lib/AppRegistryInjection.js:3:22)
at Object.<anonymous> (node_modules/react-native-root-siblings/lib/SiblingsManager.js:3:27)
I find this error to be invoked by using package react-native-root-siblings which in new release is using static-container package which is not transformed with babel.
Quick fix is to install older version of package npm install react-native-root-siblings@1.1.0
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
How to resolve jest error when attempting to run test suite?
Issue resolved. Issue was caused by running the tests by using the "jest" command in the terminal which is different from using the...
Read more >Troubleshooting - Jest
Troubleshooting. Uh oh, something went wrong? Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why.
Read more >JEST tests complete successfully but returns exit status 1 #9324
I'm running into same issue, test passess successfully but jest returns status code 1 and npm errors. PASS src/test/restart.test.ts √ restart ( ...
Read more >Running All Tests in Jest doesn't show the error message ...
I have a React / Spring Boot project where I have written several tests in Jest. I have one test where I have...
Read more >Validation Error when running jest command within node child ...
Validation Error : Jul 2 09:49:39 AM Jul 2 09:49:39 AM Module <rootDir>/test/setup.ts in the setupFilesAfterEnv option was not found.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you could use this as a work around too
ignore react-native-root-siblings didn’t work for me, but ignore
static-container
works.