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.
In using grunt-karma in conjunction with grunt-es6-module-transpiler, I've been getting the following error:
In the above case, my config was using
singleRun: true
. The error does not occur when running the task withbackground: 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.