Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help me to run tests #2

Open
rafis opened this issue Apr 4, 2017 · 2 comments
Open

Help me to run tests #2

rafis opened this issue Apr 4, 2017 · 2 comments

Comments

@rafis
Copy link

rafis commented Apr 4, 2017

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

@rafis
Copy link
Author

rafis commented Apr 4, 2017

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)

@rafis
Copy link
Author

rafis commented Apr 4, 2017

Ok, have found that it is the bug in Karma.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant