aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/node-timers.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js/node-timers.test.ts')
-rw-r--r--test/bun.js/node-timers.test.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/bun.js/node-timers.test.ts b/test/bun.js/node-timers.test.ts
new file mode 100644
index 000000000..a1f2d08a4
--- /dev/null
+++ b/test/bun.js/node-timers.test.ts
@@ -0,0 +1,10 @@
+import { test } from "bun:test";
+import { setTimeout } from "node:timers";
+
+test("unref is possible", () => {
+ const timer = setTimeout(() => {
+ throw new Error("should not be called");
+ }, 1000);
+ timer.unref();
+ clearTimeout(timer);
+});