【发布时间】:2016-01-30 16:48:24
【问题描述】:
我在 ES6 中编写了测试,使用 Babel 将其转换为 AMD 格式的 ES5。 现在我想使用 Karma(+requirejs) 和 Jasmine 运行测试,但出现以下错误:
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
【问题讨论】:
标签: jasmine karma-runner ecmascript-6