to-equal.js 415 B

12345678910111213141516171819
  1. import { isEqual } from 'lodash'
  2. beforeEach(() => {
  3. jasmine.addMatchers({
  4. // override built-in toEqual because it behaves incorrectly
  5. // on Vue-observed arrays in Safari
  6. toEqual: () => {
  7. return {
  8. compare: (a, b) => {
  9. const pass = isEqual(a, b)
  10. return {
  11. pass,
  12. message: `Expected ${a} to equal ${b}`
  13. }
  14. }
  15. }
  16. }
  17. })
  18. })