aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/process.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js/process.test.js')
-rw-r--r--test/bun.js/process.test.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/bun.js/process.test.js b/test/bun.js/process.test.js
index f82834a04..5131d3b28 100644
--- a/test/bun.js/process.test.js
+++ b/test/bun.js/process.test.js
@@ -1,4 +1,4 @@
-import { describe, it } from "bun:test";
+import { describe, expect, it } from "bun:test";
it("process", () => {
// this property isn't implemented yet but it should at least return a string
@@ -52,3 +52,17 @@ it("process", () => {
console.log("SET CWD", process.chdir("../"));
console.log("CWD", process.cwd());
});
+
+it("process.hrtime()", () => {
+ const start = process.hrtime();
+ const end = process.hrtime(start);
+ const end2 = process.hrtime();
+ expect(end[0]).toBe(0);
+ expect(end2[1] > start[1]).toBe(true);
+});
+
+it("process.hrtime.bigint()", () => {
+ const start = process.hrtime.bigint();
+ const end = process.hrtime.bigint();
+ expect(end > start).toBe(true);
+});