From 9e50b3ee61b88b8767ecd1165f2aee62a81842de Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 4 Sep 2020 21:52:19 +1000 Subject: fix: don't expose globalThis.__bootstrap (#7344) --- cli/tests/unit/globals_test.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/unit/globals_test.ts b/cli/tests/unit/globals_test.ts index dabe3c08e..5fc125296 100644 --- a/cli/tests/unit/globals_test.ts +++ b/cli/tests/unit/globals_test.ts @@ -5,6 +5,13 @@ unitTest(function globalThisExists(): void { assert(globalThis != null); }); +unitTest(function noInternalGlobals(): void { + // globalThis.__bootstrap should not be there. + for (const key of Object.keys(globalThis)) { + assert(!key.startsWith("_")); + } +}); + unitTest(function windowExists(): void { assert(window != null); }); -- cgit v1.2.3