diff options
Diffstat (limited to 'test/bun.js/bigint.test.js')
-rw-r--r-- | test/bun.js/bigint.test.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/bun.js/bigint.test.js b/test/bun.js/bigint.test.js new file mode 100644 index 000000000..ba71f3f9f --- /dev/null +++ b/test/bun.js/bigint.test.js @@ -0,0 +1,12 @@ +import { describe, expect, it } from "bun:test"; + +it("BigInt compares correctly (literal)", () => { + expect(42n).toBe(42n); +}); + +it("BigInt compares correctly (object)", () => { + expect(BigInt(42n)).toBe(BigInt(42n)); + expect(42n).toBe(BigInt(42n)); + expect(BigInt(Bun.inspect(42n).substring(0, 2))).toBe(BigInt(42n)); + expect(BigInt(42n).valueOf()).toBe(BigInt(42n)); +}); |