es6-karma-jasmine-webpack-boilerplate icon indicating copy to clipboard operation
es6-karma-jasmine-webpack-boilerplate copied to clipboard

Fresh install test fails to run

Open mwajansen opened this issue 7 years ago • 0 comments

I made sure i did not have global packages of karma or anything else to conflict while running this. Then i ran: npm install npm build npm test

Here is the full error output:

"C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2017.1\bin\runnerw.exe" "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" test

> [email protected] test D:\dev\temp\node_modules\es6-karma-jasmine-webpack-boilerplate
> karma start --single-run --no-auto-watch karma.config.js

Hash: f4683f5fa2953dc3a97c
Version: webpack 1.14.0
Time: 43ms
webpack: Compiled successfully.
webpack: Compiling...
Hash: af8ce34dc40fb7aeed94
Version: webpack 1.14.0
Time: 52ms
           Asset     Size  Chunks             Chunk Names
tests.webpack.js  7.92 kB       0  [emitted]  tests.webpack.js
chunk    {0} tests.webpack.js (tests.webpack.js) 950 bytes [rendered]
    [0] ./tests.webpack.js 214 bytes {0} [built]
    [1] ./src -test\.js$ 195 bytes {0} [built]
    [2] ./src/__tests__/Calculator-test.js 381 bytes {0} [optional] [built]
    [3] ./src !(-test\.js)$ 160 bytes {0} [built]
webpack: Compiled successfully.
05 04 2017 23:08:20.858:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
05 04 2017 23:08:20.869:INFO [launcher]: Starting browser Chrome
05 04 2017 23:08:21.312:INFO [Chrome 57.0.2987 (Windows 10 0.0.0)]: Connected on socket V-1D8oUMnXuRWU0gAAAA with id 98632320
Chrome 57.0.2987 (Windows 10 0.0.0) ERROR
  Uncaught SyntaxError: Unexpected token import
  at D:/dev/temp/node_modules/es6-karma-jasmine-webpack-boilerplate/tests.webpack.js:79


npm ERR! Test failed.  See above for more details.

Process finished with exit code 1

It seems the file does not get transpiled correctly else it would not have an import.

Since i was having trouble getting es6 in my tests i decided to try this boilerplate out but it has the same issue as i have encountered.

mwajansen avatar Apr 05 '17 21:04 mwajansen