Skip to content

Commit

Permalink
test: update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Nov 3, 2024
1 parent 81e06c8 commit 9060f9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/general.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ it('isEqual', () => {
expect(isEqual(true, true)).toBe(true)
expect(isEqual(true, false)).toBe(false)
expect(isEqual(NaN, NaN)).toBe(true)
expect(isEqual(Promise.resolve(), Promise.resolve())).toBe(false)
expect(isEqual(/abc/, /abc/)).toBe(true)
expect(isEqual(/abc/g, /abc/)).toBe(false)
expect(isEqual(/abc/, /abcd/)).toBe(false)
Expand Down Expand Up @@ -324,6 +325,7 @@ it('isEqual', () => {
expect(isEqual(new TextEncoder().encode('123').buffer, new TextEncoder().encode('1234').buffer)).toBe(false)

expect(isEqual({ n: 1 }, { n: 1 })).toBe(true)
expect(isEqual({ a: 1, b: 2 }, { b: 2, a: 1 })).toBe(true)
expect(isEqual({ n: 1 }, { n: 2 })).toBe(false)
expect(isEqual({ n: 1, x: [1] }, { n: 1, x: [1] })).toBe(true)
expect(isEqual({ n: 1, x: [1] }, { n: 1, x: [1, 2] })).toBe(false)
Expand Down

0 comments on commit 9060f9b

Please sign in to comment.