diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-09-04 21:52:19 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 07:52:19 -0400 |
commit | 9e50b3ee61b88b8767ecd1165f2aee62a81842de (patch) | |
tree | 6064237d5d7edf6339816b3620c33c8e18ca8a50 /cli/tests | |
parent | 15649b61bd7ac5d868f2df2825e242a39582a622 (diff) |
fix: don't expose globalThis.__bootstrap (#7344)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/globals_test.ts | 7 |
1 files changed, 7 insertions, 0 deletions
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); }); |