2019-01-21 14:03:30 -05:00
|
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2019-01-16 17:57:15 -05:00
|
|
|
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() {
|
2019-04-01 12:47:25 -04:00
|
|
|
// @ts-ignore (TypeScript thinks globalThis and window don't match)
|
2019-01-16 17:57:15 -05:00
|
|
|
assert(globalThis === window);
|
|
|
|
});
|
2019-02-05 08:12:58 -05:00
|
|
|
|
2019-02-12 10:08:56 -05:00
|
|
|
test(function DenoNamespaceExists() {
|
|
|
|
assert(Deno != null);
|
|
|
|
});
|
|
|
|
|
|
|
|
test(function DenoNamespaceEqualsWindowDeno() {
|
|
|
|
assert(Deno === window.Deno);
|
|
|
|
});
|
|
|
|
|
|
|
|
test(function DenoNamespaceIsFrozen() {
|
|
|
|
assert(Object.isFrozen(Deno));
|
|
|
|
});
|
|
|
|
|
2019-02-05 08:12:58 -05:00
|
|
|
test(function webAssemblyExists() {
|
|
|
|
assert(typeof WebAssembly.compile === "function");
|
|
|
|
});
|