From 299702161533d731db799f1bb6c7c95fd92c0c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 Oct 2021 08:47:14 +0200 Subject: fix: declare web types as global (#12497) Co-authored-by: Feng Yu --- cli/tests/unit/globals_test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/unit/globals_test.ts b/cli/tests/unit/globals_test.ts index d989ab54a..94c7ec3b5 100644 --- a/cli/tests/unit/globals_test.ts +++ b/cli/tests/unit/globals_test.ts @@ -122,3 +122,13 @@ unitTest(async function windowQueueMicrotask() { await p1; await p2; }); + +unitTest(function webApiGlobalThis() { + assert(globalThis.FormData !== null); + assert(globalThis.TextEncoder !== null); + assert(globalThis.TextEncoderStream !== null); + assert(globalThis.TextDecoder !== null); + assert(globalThis.TextDecoderStream !== null); + assert(globalThis.CountQueuingStrategy !== null); + assert(globalThis.ByteLengthQueuingStrategy !== null); +}); -- cgit v1.2.3