diff options
author | 2023-09-21 21:02:34 -0700 | |
---|---|---|
committer | 2023-09-21 21:02:34 -0700 | |
commit | 9d5459221ff663b6c0058440167e098886d97cc2 (patch) | |
tree | a858b76f77c3b038df5806d4f8b52e1d91b89b7b /test/js | |
parent | 341c1c1804401ff48b44774206c646751976c217 (diff) | |
download | bun-9d5459221ff663b6c0058440167e098886d97cc2.tar.gz bun-9d5459221ff663b6c0058440167e098886d97cc2.tar.zst bun-9d5459221ff663b6c0058440167e098886d97cc2.zip |
fix #5865 (#5890)
* make sure types are the same
* tests
Diffstat (limited to 'test/js')
-rw-r--r-- | test/js/bun/test/expect.test.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/js/bun/test/expect.test.js b/test/js/bun/test/expect.test.js index b6e312022..8c9959d01 100644 --- a/test/js/bun/test/expect.test.js +++ b/test/js/bun/test/expect.test.js @@ -640,6 +640,12 @@ describe("expect()", () => { expect(g).not.toEqual(a); }); + test("deepEquals and typed arrays", () => { + expect(new Uint8Array([0, 255])).not.toEqual(new Uint8ClampedArray([0, 255])); + expect(new Int8Array([0, -1])).not.toEqual(new Uint8Array([0, 255])); + expect(new Float32Array([0])).not.toEqual(new Uint8Array([0, 0, 0, 0])); + }); + test("deepEquals throw getters", () => { let a = { get x() { |