문제

Whenever I do a loadFixture() call or the test beneath this text I get an error stating:

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 seems to be loaded, otherwise I get ReferenceError: setFixtures is not defined as error.

Any clue as to what's going on?

도움이 되었습니까?

해결책

I've found what was wrong. For future reference I'm answering this myself:

My jasmine-jquery loaded before my jquery file. Switching those did the trick.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top