From 57541b48ba0402a8ff4a1e30c7e326fe9edab241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 29 Aug 2024 00:56:15 +0100 Subject: test: replace usage of `window` with `globalThis` (#25284) Fixes several tests blocking https://github.com/denoland/deno/pull/25213 by replacing `window` global that is gone in Deno 2 with `globalThis`. Also adjusted a few tests using deprecated `rid` field. --- tests/testdata/run/025_hrtime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/testdata/run/025_hrtime.ts') diff --git a/tests/testdata/run/025_hrtime.ts b/tests/testdata/run/025_hrtime.ts index b69d61488..7e69b0ddf 100644 --- a/tests/testdata/run/025_hrtime.ts +++ b/tests/testdata/run/025_hrtime.ts @@ -1,4 +1,4 @@ -window.onload = async () => { +globalThis.onload = async () => { console.log(performance.now() % 2 !== 0); await Deno.permissions.revoke({ name: "hrtime" }); console.log(performance.now() % 2 === 0); -- cgit v1.2.3