karma-runner / grunt-karma

Grunt plugin for Karma.
MIT License
468 stars 116 forks source link

singleRun fails when an es6-module-transpiler task is run earlier #90

Closed uoodsq closed 10 years ago

uoodsq commented 10 years ago

In using grunt-karma in conjunction with grunt-es6-module-transpiler, I've been getting the following error:

Running "transpile:test" (transpile) task
...
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.10.9 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
Fatal error: Cannot read property 'os' of undefined

In the above case, my config was using singleRun: true. The error does not occur when running the task with background: true, or starting/running the tests separately.

The issue is apparently related to the transpiler polyfilling Object.defineProperty.

I've worked around it by wrapping my transpile tasks in grunt-concurrent tasks.

Since it seems to be an issue with the transpiler, it may not be something that can be fixed, but I thought I'd just bring it up here anyway.

uoodsq commented 10 years ago

After some more digging, es6-module-transpiler is definitely to blame. Closing.