問題:
Is there a way in jasmine.js to check if two arrays are equal, for example: 在jasmine.js中是否有辦法檢查兩個數組是否相等,例如:
arr = [1, 2, 3]
expect(arr).toBe([1, 2, 3])
expect(arr).toEqual([1, 2, 3])
Neither seems to work. 似乎都沒有用。
解決方案:
參考一: https://en.stackoom.com/question/13wvc參考二: https://stackoom.com/question/13wvc