Checking object equality in Jasmine

前端 未结 5 1808
小蘑菇
小蘑菇 2021-02-01 11:51

Jasmine has built-in matchers toBe and toEqual. If I have an object like this:

function Money(amount, currency){
    this.amount = amou         


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-01 12:23

    I was looking for the same thing and found an existing way to do so without any custom code or matchers. Use toEqual().

提交回复
热议问题