From dd1d6a0f67cb386941ddc08aa453612f8398144f Mon Sep 17 00:00:00 2001 From: Geert-Jan Zwiers Date: Fri, 6 May 2022 19:37:18 +0200 Subject: feat(web): add `performance.timeOrigin` (#14489) Add support for the `performance.timeOrigin` web API. Co-authored-by: Jovi De Croock --- cli/tests/unit/performance_test.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/tests/unit') diff --git a/cli/tests/unit/performance_test.ts b/cli/tests/unit/performance_test.ts index 4c7d08d4e..252a31fc4 100644 --- a/cli/tests/unit/performance_test.ts +++ b/cli/tests/unit/performance_test.ts @@ -20,6 +20,13 @@ Deno.test({ permissions: { hrtime: false } }, async function performanceNow() { assert(totalTime >= 10); }); +Deno.test(function timeOrigin() { + const origin = performance.timeOrigin; + + assert(origin > 0); + assert(Date.now() >= origin); +}); + Deno.test(function performanceMark() { const mark = performance.mark("test"); assert(mark instanceof PerformanceMark); -- cgit v1.2.3