aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/node-timers.test.ts
blob: a1f2d08a462689f8f92d6a05dd11e52cf9830048 (plain) (blame)
1
2
3
4
5
6
7
8
9
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);
});