What could be the reason for Jest
failing with the error message "Unexpected token *" when encountering a simple import statement?
Error log:
Admin@Admin-PC MINGW32 /d/project (master)
$ npm run test
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a8e5d1e9d8d8e89886988699">[email protected]</a> test D:\project
> jest
FAIL __tests__/App-test.tsx
...
Test Suites: 3 failed, 3 total
Tests: 2 failed, 2 total
Snapshots: 0 total
Time: 22.774s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c489bd85b4b484f4eaf4eaf5">[email protected]</a> test: `jest`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="682511291818285846584659">[email protected]</a> test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Roaming\Roaming\npm-cache\_logs\2019-04-22T11_52_36_984Z-debug.log
package.json
file:
...
babel.config.js
file:
...
jest.config.js
file:
...
Note: I am utilizing the react-native
type-script template by running
react-native init MyApp --template typescript