computmaxer / karma-jspm

Other
74 stars 50 forks source link

Doesn't seem to be transpiling es6 #60

Open togakangaroo opened 9 years ago

togakangaroo commented 9 years ago

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 )
Psvensso commented 9 years ago

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.