diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2019-01-17 09:57:15 +1100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-01-16 17:57:15 -0500 |
commit | 00b655add1c83a3924f1e86b51689aa1ed8e5d05 (patch) | |
tree | 4728148fa46fee8671f6074215d859c78cdfefd7 /js/globals_test.ts | |
parent | eb6f7f901b3b4fd6bfb1596923b50eef8195a131 (diff) |
Add globalThis definition to runtime (#1534)
Diffstat (limited to 'js/globals_test.ts')
-rw-r--r-- | js/globals_test.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/globals_test.ts b/js/globals_test.ts new file mode 100644 index 000000000..e40718f28 --- /dev/null +++ b/js/globals_test.ts @@ -0,0 +1,17 @@ +import { test, assert } from "./test_util.ts"; + +test(function globalThisExists() { + assert(globalThis != null); +}); + +test(function windowExists() { + assert(window != null); +}); + +test(function windowWindowExists() { + assert(window.window === window); +}); + +test(function globalThisEqualsWindow() { + assert(globalThis === window); +}); |