aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/inspect.test.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/bun.js/inspect.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/bun.js/inspect.test.js b/test/bun.js/inspect.test.js
index 229f80548..243f23cdc 100644
--- a/test/bun.js/inspect.test.js
+++ b/test/bun.js/inspect.test.js
@@ -1,5 +1,14 @@
import { it, expect, describe } from "bun:test";
+it("Timeout", () => {
+ const id = setTimeout(() => {}, 0);
+ expect(Bun.inspect(id)).toBe(`Timeout (#${+id})`);
+
+ const id2 = setInterval(() => {}, 1);
+ id2.unref();
+ expect(Bun.inspect(id2)).toBe(`Timeout (#${+id2}, repeats)`);
+});
+
it("when prototype defines the same property, don't print the same property twice", () => {
var base = {
foo: "123",