Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.13 KB | None | 0 0
  1. eugene.rodionov@dev-1-s:alan-serenity-redux$ npm run test
  2.  
  3. > ui-elements@1.0.0 test /home/eugene.rodionov/projects/alan-serenity-redux
  4. > jest
  5.  
  6. FAIL elements/notif/__tests__/notif.test.jsx
  7. ● Test suite failed to run
  8.  
  9. Jest encountered an unexpected token
  10.  
  11. This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
  12.  
  13. By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
  14.  
  15. Here's what you can do:
  16. • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
  17. • If you need a custom transformation specify a "transform" option in your config.
  18. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
  19.  
  20. You'll find more details and examples of these config options in the docs:
  21. https://jestjs.io/docs/en/configuration.html
  22.  
  23. Details:
  24.  
  25. /home/eugene.rodionov/projects/alan-serenity-redux/test/config.js:1
  26. ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import Enzyme from 'enzyme';
  27. ^^^^^^
  28.  
  29. SyntaxError: Unexpected token import
  30.  
  31. at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
  32. at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)
  33.  
  34. Test Suites: 1 failed, 1 total
  35. Tests: 0 total
  36. Snapshots: 0 total
  37. Time: 0.699s
  38. Ran all test suites.
  39. npm ERR! code ELIFECYCLE
  40. npm ERR! errno 1
  41. npm ERR! ui-elements@1.0.0 test: `jest`
  42. npm ERR! Exit status 1
  43. npm ERR!
  44. npm ERR! Failed at the ui-elements@1.0.0 test script.
  45. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  46.  
  47. npm ERR! A complete log of this run can be found in:
  48. npm ERR! /home/eugene.rodionov/.npm/_logs/2019-07-22T19_37_36_120Z-debug.log
  49. git_branch: command not found
  50. markup_git_branch: command not found
  51. eugene.rodionov@dev-1-s:alan-serenity-redux$
  52.  
  53.  
  54. ---
  55.  
  56.  
  57. 0 info it worked if it ends with ok
  58. 1 verbose cli [ '/usr/local/nvm/versions/node/v8.9.0/bin/node',
  59. 1 verbose cli '/usr/local/nvm/versions/node/v8.9.0/bin/npm',
  60. 1 verbose cli 'run',
  61. 1 verbose cli 'test' ]
  62. 2 info using npm@6.8.0
  63. 3 info using node@v8.9.0
  64. 4 verbose run-script [ 'pretest', 'test', 'posttest' ]
  65. 5 info lifecycle ui-elements@1.0.0~pretest: ui-elements@1.0.0
  66. 6 info lifecycle ui-elements@1.0.0~test: ui-elements@1.0.0
  67. 7 verbose lifecycle ui-elements@1.0.0~test: unsafe-perm in lifecycle true
  68. 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
  69. 9 verbose lifecycle ui-elements@1.0.0~test: CWD: /home/eugene.rodionov/projects/alan-serenity-redux
  70. 10 silly lifecycle ui-elements@1.0.0~test: Args: [ '-c', 'jest' ]
  71. 11 silly lifecycle ui-elements@1.0.0~test: Returned: code: 1 signal: null
  72. 12 info lifecycle ui-elements@1.0.0~test: Failed to exec test script
  73. 13 verbose stack Error: ui-elements@1.0.0 test: `jest`
  74. 13 verbose stack Exit status 1
  75. 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)
  76. 13 verbose stack at emitTwo (events.js:126:13)
  77. 13 verbose stack at EventEmitter.emit (events.js:214:7)
  78. 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)
  79. 13 verbose stack at emitTwo (events.js:126:13)
  80. 13 verbose stack at ChildProcess.emit (events.js:214:7)
  81. 13 verbose stack at maybeClose (internal/child_process.js:925:16)
  82. 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  83. 14 verbose pkgid ui-elements@1.0.0
  84. 15 verbose cwd /home/eugene.rodionov/projects/alan-serenity-redux
  85. 16 verbose Linux 4.15.0-1036-gcp
  86. 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"
  87. 18 verbose node v8.9.0
  88. 19 verbose npm v6.8.0
  89. 20 error code ELIFECYCLE
  90. 21 error errno 1
  91. 22 error ui-elements@1.0.0 test: `jest`
  92. 22 error Exit status 1
  93. 23 error Failed at the ui-elements@1.0.0 test script.
  94. 23 error This is probably not a problem with npm. There is likely additional logging output above.
  95. 24 verbose exit [ 1, true ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement