Jasmine expect logic (expect A OR B)

后端 未结 4 1665
执念已碎
执念已碎 2020-12-28 12:40

I need to set the test to succeed if one of the two expectations is met:

expect(mySpy.mostRecentCall.args[0]).toEqual(jasmine.any(Number));
expect(mySpy.most         


        
4条回答
  •  天涯浪人
    2020-12-28 12:55

    Add multiple comparable strings into an array and then compare. Reverse the order of comparison.

    expect(["New", "In Progress"]).toContain(Status);
    

提交回复
热议问题