computmaxer / karma-jspm

Other
74 stars 50 forks source link

ES6 support? (Error evaluating http://localhost:9876/base/jspm_packages/traceur.js) #21

Closed theefer closed 9 years ago

theefer commented 9 years ago

I've been trying to add karma-jspm to my project (see tests-karma branch) but I'm getting errors, which I've tracked down to the System.import in adapter.js throwing the error string:

Error evaluating http://localhost:9876/base/jspm_packages/traceur.js

This seems to happen whenever any of the specs or any of the files the specs load is in the ES6 format.

If all loaded files are in AMD or CJS format, everything seems to work fine.

Is karma-jspm supposed to work with ES6 and if so, is there any working example I could take a look at?

theefer commented 9 years ago

Turns out the problem was that it doesn't work using phantomjs, but it's fine with Chrome. The issue likely comes from the fact that traceur generates ES5, which phantomjs doesn't support.