Skip to content

Commit

Permalink
test: update
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Nov 3, 2024
1 parent 4f6c4a8 commit 3fba30d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/general.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,34 @@ it('isEqual', () => {
() => {},
),
).toBe(false)
// eslint-disable-next-line
expect(isEqual(new String('123'), new String('123'))).toBe(true)
// eslint-disable-next-line
expect(isEqual(new String('123'), new String('1234'))).toBe(false)
// eslint-disable-next-line
expect(isEqual(new Number(1), new Number(1))).toBe(true)
// eslint-disable-next-line
expect(isEqual(new Number(1), new Number(2))).toBe(false)
// eslint-disable-next-line
expect(isEqual(new Boolean(true), new Boolean(true))).toBe(true)
// eslint-disable-next-line
expect(isEqual(new Boolean(true), new Boolean(false))).toBe(false)
// eslint-disable-next-line
expect(isEqual(new Object(Symbol()), new Object(Symbol()))).toBe(false)
// eslint-disable-next-line
expect(isEqual(new Object(BigInt(1)), new Object(BigInt(1)))).toBe(true)
// eslint-disable-next-line
expect(isEqual(new Object(BigInt(1)), new Object(BigInt(2)))).toBe(false)
// eslint-disable-next-line
expect(isEqual('123', new String('123'))).toBe(false)
// eslint-disable-next-line
expect(isEqual(1, new Number(1))).toBe(false)
// eslint-disable-next-line
expect(isEqual(true, new Boolean(true))).toBe(false)
// eslint-disable-next-line
expect(isEqual(Symbol('test'), new Object(Symbol('test')))).toBe(false)
// eslint-disable-next-line
expect(isEqual(BigInt(1), new Object(BigInt(1)))).toBe(false)

class A {}
class B {}
Expand Down

0 comments on commit 3fba30d

Please sign in to comment.