From cf6673b23d2579af7cfe43918127d30556a786da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 14 Nov 2023 12:03:09 +0100 Subject: fix(ext/node): add APIs perf_hook.performance (#21192) Required for Next.js. --- cli/tests/unit_node/perf_hooks_test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cli/tests/unit_node/perf_hooks_test.ts') diff --git a/cli/tests/unit_node/perf_hooks_test.ts b/cli/tests/unit_node/perf_hooks_test.ts index 2249e62f8..d1ab8c12c 100644 --- a/cli/tests/unit_node/perf_hooks_test.ts +++ b/cli/tests/unit_node/perf_hooks_test.ts @@ -13,12 +13,22 @@ Deno.test({ assertEquals(perfHooks.performance.clearMarks, performance.clearMarks); assertEquals(perfHooks.performance.mark, performance.mark); assertEquals(perfHooks.performance.now, performance.now); + assertEquals( + perfHooks.performance.getEntriesByName, + performance.getEntriesByName, + ); + assertEquals( + perfHooks.performance.getEntriesByType, + performance.getEntriesByType, + ); // @ts-ignore toJSON is not in Performance interface assertEquals(perfHooks.performance.toJSON, performance.toJSON); perfHooks.performance.measure("test"); perfHooks.performance.mark("test"); perfHooks.performance.clearMarks("test"); perfHooks.performance.now(); + assertEquals(perfHooks.performance.getEntriesByName("event", "mark"), []); + assertEquals(perfHooks.performance.getEntriesByType("mark"), []); // @ts-ignore toJSON is not in Performance interface perfHooks.performance.toJSON(); }, -- cgit v1.2.3