diff options
Diffstat (limited to 'test/bun.js/performance.test.js')
-rw-r--r-- | test/bun.js/performance.test.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bun.js/performance.test.js b/test/bun.js/performance.test.js index 5e8520638..0ff75b945 100644 --- a/test/bun.js/performance.test.js +++ b/test/bun.js/performance.test.js @@ -16,3 +16,9 @@ it("performance.now() should be monotonic", () => { expect(Bun.nanoseconds() > sixth).toBe(true); expect(typeof Bun.nanoseconds() === "number").toBe(true); }); + +it("performance.timeOrigin + performance.now() should be similar to Date.now()", () => { + expect( + Math.abs(performance.timeOrigin + performance.now() - Date.now()) < 1000 + ).toBe(true); +}); |