2015-10-30 78 views
1

我已经在ES6中编写了测试,使用Babel将其转换为AMD格式的ES5。 现在我想要运行使用噶(+ requirejs)和茉莉的考验,但越来越以下错误:测试Babel在Karma + Jasmine中编译(AMD)ES6代码

Error: Mismatched anonymous define() module: function (exports) { 
    "use strict"; 

    describe("App", function() { 
     it("tests something", function() { 
      expect(true).toBe(true); 
     }); 
    }); 
} 

测试文件看起来像:

define(["exports"], function (exports) { 
    "use strict"; 

    describe("App", function() { 
     it("tests something", function() { 
      expect(true).toBe(true); 
     }); 
    }); 
}); 
//# sourceMappingURL=app.js.map 

回答

0

我不transpiling先ES5 ,但使用karma-babel-preprocessor。

相关问题