chrome-storage-promise
chrome-storage-promise copied to clipboard
Help me to run tests
I'm trying to run tests, but seems karma runs webpack without babel (without using webpack.conf.js):
> [email protected] test /home/user/chrome-storage-promise
> karma start
Hash: 8344a6c0a9b3c44a5636
Version: webpack 1.9.13
Time: 11ms
webpack: Compiled successfully.
webpack: Compiling...
Hash: 8344a6c0a9b3c44a5636
Version: webpack 1.9.13
Time: 32ms
ERROR in ./test/spec.js
Module parse failed: /home/user/chrome-storage-promise/test/spec.js Line 3: Unexpected reserved word
You may need an appropriate loader to handle this file type.
| 'use strict';
|
| import {unrequireAll} from './spec-helper'
|
| describe('chrome-storage-promise', () => {
webpack: Failed to compile.
Node: 7.7.3
I have changed
preprocessors: {
'test/*.js': ['webpack']
},
to
preprocessors: {
'test/*.js': ['babel']
},
Now it works, but I'm receiving this error:
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 57.0.2987 (Linux 0.0.0)]: Connected on socket -gfQBsoSQZNlDyvQ0ch4 with id 53962854
ERROR [karma]: TypeError: The header content contains invalid characters
at ServerResponse.setHeader (_http_outgoing.js:374:11)
at ServerResponse.res.setHeader (/home/user/chrome-storage-promise/node_modules/connect/lib/patch.js:134:22)
at Object.setNoCacheHeaders (/home/user/chrome-storage-promise/node_modules/karma/lib/middleware/common.js:76:12)
at /home/user/chrome-storage-promise/node_modules/karma/lib/middleware/karma.js:109:18
at /home/user/chrome-storage-promise/node_modules/karma/lib/middleware/common.js:63:35
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:438:3)
Ok, have found that it is the bug in Karma.