2

I am using jquery 1.7.1 and jasmine 1.3.1, I added jasmine 2.0.3 from https://github.com/velesin/jasmine-jquery when I ran this test

        it("Should invoke the OnTheMove_QueryDatabaseExecuted event.", function () {
        var spy = spyOnEvent(document, 'OnTheMove_QueryDatabaseExecuted');
        $(document).trigger('OnTheMove_QueryDatabaseExecuted');
        expect('OnTheMove_QueryDatabaseExecuted').toHaveBeenTriggeredOn(document);
        expect(spy).toHaveBeenTriggered();
    });

I got 34 instances of error:

TypeError: Object #<Object> has no method 'addMatchers'

I have done some readaround and now I am assuming this is compatibility issue.
Question: What is the highest version of jasmine-jquery that is compatible with jasmine 1.3.1?
Are both of these versions compatible with jquery 1.7.1 and what is the highest jquery version that is compatable?


The C# code may look like this.

myEntity.Attributes["abc_transactionamount"] = new Money((decimal)obj.TotalAmountToPay);
4

1 回答 1

0

我不得不更新 karma-jasmine 来解决这个问题,但我不得不手动修改 package.json 条目。

该行应为:

"karma-jasmine": "~0.2.0"

我没有受到升级的负面影响,jQuery 也不应该受到影响。

于 2014-10-23T19:18:57.540 回答