diff options
author | 2022-06-26 06:01:22 -0700 | |
---|---|---|
committer | 2022-06-26 06:01:22 -0700 | |
commit | 77a0f335cb0f18af4e03713583b98e0e1b024b33 (patch) | |
tree | f6ed90a992cb46677ab597bba4f6db2fbfcba3b1 /test/bun.js/bigint.test.js | |
parent | 31cfcf2c9f40520dac72530ec62e765d3a0de221 (diff) | |
download | bun-77a0f335cb0f18af4e03713583b98e0e1b024b33.tar.gz bun-77a0f335cb0f18af4e03713583b98e0e1b024b33.tar.zst bun-77a0f335cb0f18af4e03713583b98e0e1b024b33.zip |
wip ReadableStream for HTTP(s) Server
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)); +}); |