summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/globals_test.ts17
-rw-r--r--js/unit_tests.ts1
2 files changed, 18 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);
+});
diff --git a/js/unit_tests.ts b/js/unit_tests.ts
index e02d5e303..35050fc84 100644
--- a/js/unit_tests.ts
+++ b/js/unit_tests.ts
@@ -18,6 +18,7 @@ import "./fetch_test.ts";
// import "./file_test.ts";
import "./files_test.ts";
import "./form_data_test.ts";
+import "./globals_test.ts";
import "./headers_test.ts";
import "./make_temp_dir_test.ts";
import "./metrics_test.ts";