karma-jspm icon indicating copy to clipboard operation
karma-jspm copied to clipboard

Doesn't seem to be transpiling es6

Open togakangaroo opened this issue 9 years ago • 1 comments

I have the following very simple test.js

describe("some test", () => {
    it("should pass", () => expect(true).toBe(true));
    it("should fail", () => expect(false).toBe(true));
})

With the very simple karma configuration

module.exports = function(config) {
  config.set({
    frameworks: ['jspm', 'jasmine'],
    browsers: ['Chrome'],
    autoWatch: true,
    jspm: {
        loadFiles: ['tests/*.js'],
        serveFiles: []
    },
    files: [
    ],

    client: {
    }
  });
};

Running this cannot seem to interpret my js file

(program):1 Uncaught SyntaxError: Unexpected token )
:9876/absoluteW:/.../node_modules/karma-jspm/src/adapter.js?24ddd220d7a2584ac6ab786e71addf444e440a4d:59 Uncaught Error loading "tests/simpleTest" at http://localhost:9876/base/tests/simpleTest.js
Error evaluating http://localhost:9876/base/tests/simpleTest.js
Uncaught SyntaxError: Unexpected token )

togakangaroo avatar Jun 20 '15 20:06 togakangaroo

I had the same problems, removing the unnessesary preprosessor karma-babel-preprocessor from packages.json (and removing the files in node_modules ofc) made everythign work again. Iv´e been trying to debugg and replicate it but now eveerything just seems to work.....

So at least a tip then is to remove all old preprocessors from your npm packages.

Psvensso avatar Jun 27 '15 09:06 Psvensso