From bc666e42a89f2f6ab104e5f1c1298ec590a99ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 17 Jan 2022 23:23:49 +0100 Subject: fix(ext/console): don't depend on globalThis present (#13387) --- cli/tests/integration/run_tests.rs | 5 +++++ cli/tests/testdata/colors_without_globalThis.js | 1 + 2 files changed, 6 insertions(+) create mode 100644 cli/tests/testdata/colors_without_globalThis.js (limited to 'cli') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index bc137a7fd..2f32fd67f 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2479,3 +2479,8 @@ itest!(import_assertions_type_check { output: "import_assertions/type_check.out", exit_code: 1, }); + +itest!(colors_without_global_this { + args: "run colors_without_globalThis.js", + output_str: Some("true\n"), +}); diff --git a/cli/tests/testdata/colors_without_globalThis.js b/cli/tests/testdata/colors_without_globalThis.js new file mode 100644 index 000000000..f9d4b68fc --- /dev/null +++ b/cli/tests/testdata/colors_without_globalThis.js @@ -0,0 +1 @@ +console.log(delete globalThis.globalThis); -- cgit v1.2.3