Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- eugene.rodionov@dev-1-s:alan-serenity-redux$ npm run test
- > ui-elements@1.0.0 test /home/eugene.rodionov/projects/alan-serenity-redux
- > jest
- FAIL elements/notif/__tests__/notif.test.jsx
- ● Test suite failed to run
- Jest encountered an unexpected token
- This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
- By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
- Here's what you can do:
- • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
- • If you need a custom transformation specify a "transform" option in your config.
- • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
- You'll find more details and examples of these config options in the docs:
- https://jestjs.io/docs/en/configuration.html
- Details:
- /home/eugene.rodionov/projects/alan-serenity-redux/test/config.js:1
- ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import Enzyme from 'enzyme';
- ^^^^^^
- SyntaxError: Unexpected token import
- at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
- at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)
- Test Suites: 1 failed, 1 total
- Tests: 0 total
- Snapshots: 0 total
- Time: 0.699s
- Ran all test suites.
- npm ERR! code ELIFECYCLE
- npm ERR! errno 1
- npm ERR! ui-elements@1.0.0 test: `jest`
- npm ERR! Exit status 1
- npm ERR!
- npm ERR! Failed at the ui-elements@1.0.0 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! /home/eugene.rodionov/.npm/_logs/2019-07-22T19_37_36_120Z-debug.log
- git_branch: command not found
- markup_git_branch: command not found
- eugene.rodionov@dev-1-s:alan-serenity-redux$
- ---
- 0 info it worked if it ends with ok
- 1 verbose cli [ '/usr/local/nvm/versions/node/v8.9.0/bin/node',
- 1 verbose cli '/usr/local/nvm/versions/node/v8.9.0/bin/npm',
- 1 verbose cli 'run',
- 1 verbose cli 'test' ]
- 2 info using npm@6.8.0
- 3 info using node@v8.9.0
- 4 verbose run-script [ 'pretest', 'test', 'posttest' ]
- 5 info lifecycle ui-elements@1.0.0~pretest: ui-elements@1.0.0
- 6 info lifecycle ui-elements@1.0.0~test: ui-elements@1.0.0
- 7 verbose lifecycle ui-elements@1.0.0~test: unsafe-perm in lifecycle true
- 8 verbose lifecycle ui-elements@1.0.0~test: PATH: /usr/local/nvm/versions/node/v8.9.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/eugene.rodionov/projects/alan-serenity-redux/node_modules/.bin:/home/eugene.rodionov/.vscode-server-insiders/bin/81ed55af79f01e9e64c3438558d2c2233e382a5a/bin:/home/eugene.rodionov/bin:/home/eugene.rodionov/.local/bin:/usr/local/rbenv/shims:/usr/local/rbenv/bin:/usr/local/nvm/versions/node/v8.9.0/bin:/home/eugene.rodionov/.vscode-server-insiders/bin/81ed55af79f01e9e64c3438558d2c2233e382a5a/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
- 9 verbose lifecycle ui-elements@1.0.0~test: CWD: /home/eugene.rodionov/projects/alan-serenity-redux
- 10 silly lifecycle ui-elements@1.0.0~test: Args: [ '-c', 'jest' ]
- 11 silly lifecycle ui-elements@1.0.0~test: Returned: code: 1 signal: null
- 12 info lifecycle ui-elements@1.0.0~test: Failed to exec test script
- 13 verbose stack Error: ui-elements@1.0.0 test: `jest`
- 13 verbose stack Exit status 1
- 13 verbose stack at EventEmitter.<anonymous> (/usr/local/nvm/versions/node/v8.9.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
- 13 verbose stack at emitTwo (events.js:126:13)
- 13 verbose stack at EventEmitter.emit (events.js:214:7)
- 13 verbose stack at ChildProcess.<anonymous> (/usr/local/nvm/versions/node/v8.9.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
- 13 verbose stack at emitTwo (events.js:126:13)
- 13 verbose stack at ChildProcess.emit (events.js:214:7)
- 13 verbose stack at maybeClose (internal/child_process.js:925:16)
- 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
- 14 verbose pkgid ui-elements@1.0.0
- 15 verbose cwd /home/eugene.rodionov/projects/alan-serenity-redux
- 16 verbose Linux 4.15.0-1036-gcp
- 17 verbose argv "/usr/local/nvm/versions/node/v8.9.0/bin/node" "/usr/local/nvm/versions/node/v8.9.0/bin/npm" "run" "test"
- 18 verbose node v8.9.0
- 19 verbose npm v6.8.0
- 20 error code ELIFECYCLE
- 21 error errno 1
- 22 error ui-elements@1.0.0 test: `jest`
- 22 error Exit status 1
- 23 error Failed at the ui-elements@1.0.0 test script.
- 23 error This is probably not a problem with npm. There is likely additional logging output above.
- 24 verbose exit [ 1, true ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement