summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-10-21 08:47:14 +0200
committerGitHub <noreply@github.com>2021-10-21 08:47:14 +0200
commit299702161533d731db799f1bb6c7c95fd92c0c11 (patch)
treeb390c1b114a852eea04bc53dc252885f0bd6fb35 /cli
parent8a0e206ede0f5cc7c21312688e86a1157edb4bcf (diff)
fix: declare web types as global (#12497)
Co-authored-by: Feng Yu <F3n67u@outlook.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/unit/globals_test.ts10
1 files changed, 10 insertions, 0 deletions
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);
+});