Advertisement
Guest User

Untitled

a guest
Apr 28th, 2019
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.13 KB | None | 0 0
  1. jest-haste-map: Haste module naming collision: ng-template
  2. The following files share their name; please adjust your hasteImpl:
  3. * <rootDir>/.var/app/com.visualstudio.code/data/vscode/extensions/angular.ng-template-0.1.11/server/package.json
  4. * <rootDir>/.var/app/com.visualstudio.code/data/vscode/extensions/angular.ng-template-0.1.11/package.json
  5.  
  6. FAIL .var/app/com.visualstudio.code/data/vscode/extensions/mgmcdermott.vscode-language-babel-0.0.22/test.js
  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. SyntaxError: /home/alex/.var/app/com.visualstudio.code/data/vscode/extensions/mgmcdermott.vscode-language-babel-0.0.22/test.js: Unexpected token (16:2)
  26.  
  27. 14 | `;
  28. 15 | const App = () => (
  29. > 16 | <StyledComponent>
  30. | ^
  31. 17 | {/* <p>Proper JSX commenting</p> */}
  32. 18 | <input
  33. 19 | name="input"
  34.  
  35. at Parser.raise (node_modules/@babel/parser/lib/index.js:6322:17)
  36. at Parser.unexpected (node_modules/@babel/parser/lib/index.js:7638:16)
  37. at Parser.parseExprAtom (node_modules/@babel/parser/lib/index.js:8799:20)
  38. at Parser.parseExprSubscripts (node_modules/@babel/parser/lib/index.js:8385:23)
  39. at Parser.parseMaybeUnary (node_modules/@babel/parser/lib/index.js:8365:21)
  40. at Parser.parseExprOps (node_modules/@babel/parser/lib/index.js:8252:23)
  41. at Parser.parseMaybeConditional (node_modules/@babel/parser/lib/index.js:8225:23)
  42. at Parser.parseMaybeAssign (node_modules/@babel/parser/lib/index.js:8172:21)
  43. at Parser.parseParenAndDistinguishExpression (node_modules/@babel/parser/lib/index.js:8937:28)
  44. at Parser.parseExprAtom (node_modules/@babel/parser/lib/index.js:8731:21)
  45.  
  46. FAIL .var/app/com.visualstudio.code/data/vscode/extensions/mgmcdermott.vscode-language-babel-0.0.22/test.jsx
  47. ● Test suite failed to run
  48.  
  49. Jest encountered an unexpected token
  50.  
  51. This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
  52.  
  53. By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
  54.  
  55. Here's what you can do:
  56. • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
  57. • If you need a custom transformation specify a "transform" option in your config.
  58. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
  59.  
  60. You'll find more details and examples of these config options in the docs:
  61. https://jestjs.io/docs/en/configuration.html
  62.  
  63. Details:
  64.  
  65. SyntaxError: /home/alex/.var/app/com.visualstudio.code/data/vscode/extensions/mgmcdermott.vscode-language-babel-0.0.22/test.jsx: Unexpected token (16:2)
  66.  
  67. 14 | `;
  68. 15 | const App = () => (
  69. > 16 | <StyledComponent>
  70. | ^
  71. 17 | {/* <p>Proper JSX commenting</p> */}
  72. 18 | <input
  73. 19 | name="input"
  74.  
  75. at Parser.raise (node_modules/@babel/parser/lib/index.js:6322:17)
  76. at Parser.unexpected (node_modules/@babel/parser/lib/index.js:7638:16)
  77. at Parser.parseExprAtom (node_modules/@babel/parser/lib/index.js:8799:20)
  78. at Parser.parseExprSubscripts (node_modules/@babel/parser/lib/index.js:8385:23)
  79. at Parser.parseMaybeUnary (node_modules/@babel/parser/lib/index.js:8365:21)
  80. at Parser.parseExprOps (node_modules/@babel/parser/lib/index.js:8252:23)
  81. at Parser.parseMaybeConditional (node_modules/@babel/parser/lib/index.js:8225:23)
  82. at Parser.parseMaybeAssign (node_modules/@babel/parser/lib/index.js:8172:21)
  83. at Parser.parseParenAndDistinguishExpression (node_modules/@babel/parser/lib/index.js:8937:28)
  84. at Parser.parseExprAtom (node_modules/@babel/parser/lib/index.js:8731:21)
  85.  
  86. PASS ./sum.test.js
  87.  
  88. Test Suites: 2 failed, 1 passed, 3 total
  89. Tests: 1 passed, 1 total
  90. Snapshots: 0 total
  91. Time: 4.709s
  92. Ran all test suites.
  93. npm ERR! code ELIFECYCLE
  94. npm ERR! errno 1
  95. npm ERR! @ test: `jest`
  96. npm ERR! Exit status 1
  97. npm ERR!
  98. npm ERR! Failed at the @ test script.
  99. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  100.  
  101. npm ERR! A complete log of this run can be found in:
  102. npm ERR! /home/alex/.npm/_logs/2019-04-28T10_50_45_892Z-debug.log
  103. alex@alex-Z:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement