每当我进行loadFixture()
电话或本文下的测试时,我都会收到错误消息:
Frontend should be able to set fixtures.
TypeError: undefined is not a function
TypeError: undefined is not a function
at jasmine.Fixtures.cleanUp (http://localhost:4567/__spec__/helpers/jasmine-jquery.js:89:5)
at null.<anonymous> (http://localhost:4567/__spec__/helpers/jasmine-jquery.js:641:27)
at jasmine.Block.execute (http://localhost:4567/__jasmine__/jasmine.js:1064:17)
at jasmine.Queue.next_ (http://localhost:4567/__jasmine__/jasmine.js:2096:31)
at http://localhost:4567/__jasmine__/jasmine.js:2086:18
it("should be able to set fixtures", function() {
expect(setFixtures).toBeDefined(); // Notice I took out the ()
});
似乎加载了jasmine-jquery,否则我将ReferenceError: setFixtures is not defined
视为错误。
关于发生了什么的任何线索?
答案 0 :(得分:14)
我发现了什么问题。为了将来参考我自己回答:
我的jasery-jquery在我的jquery文件之前加载。切换它们就可以了。