aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/bigint.test.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-06-26 06:01:22 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-06-26 06:01:22 -0700
commit77a0f335cb0f18af4e03713583b98e0e1b024b33 (patch)
treef6ed90a992cb46677ab597bba4f6db2fbfcba3b1 /test/bun.js/bigint.test.js
parent31cfcf2c9f40520dac72530ec62e765d3a0de221 (diff)
downloadbun-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.js12
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));
+});