summaryrefslogtreecommitdiff
path: root/cli/tests/unit/globals_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-11-23 17:45:18 +0100
committerGitHub <noreply@github.com>2021-11-23 17:45:18 +0100
commitbedb2adfb065c1b0d3bcb773fbeff91230402b6b (patch)
treeb4d90c36f2409f7f9b6247b74e9c111a38befcdf /cli/tests/unit/globals_test.ts
parent51e3db956a5927229e3f46f4eaaf317e935f8f17 (diff)
refactor: remove "unitTest" wrapper from cli/tests/unit (#12750)
Diffstat (limited to 'cli/tests/unit/globals_test.ts')
-rw-r--r--cli/tests/unit/globals_test.ts42
1 files changed, 21 insertions, 21 deletions
diff --git a/cli/tests/unit/globals_test.ts b/cli/tests/unit/globals_test.ts
index f3c8141d8..fccf65ce3 100644
--- a/cli/tests/unit/globals_test.ts
+++ b/cli/tests/unit/globals_test.ts
@@ -1,73 +1,73 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// deno-lint-ignore-file no-window-prefix
-import { assert, unitTest } from "./test_util.ts";
+import { assert } from "./test_util.ts";
-unitTest(function globalThisExists() {
+Deno.test(function globalThisExists() {
assert(globalThis != null);
});
-unitTest(function noInternalGlobals() {
+Deno.test(function noInternalGlobals() {
// globalThis.__bootstrap should not be there.
for (const key of Object.keys(globalThis)) {
assert(!key.startsWith("_"));
}
});
-unitTest(function windowExists() {
+Deno.test(function windowExists() {
assert(window != null);
});
-unitTest(function selfExists() {
+Deno.test(function selfExists() {
assert(self != null);
});
-unitTest(function windowWindowExists() {
+Deno.test(function windowWindowExists() {
assert(window.window === window);
});
-unitTest(function windowSelfExists() {
+Deno.test(function windowSelfExists() {
assert(window.self === window);
});
-unitTest(function globalThisEqualsWindow() {
+Deno.test(function globalThisEqualsWindow() {
assert(globalThis === window);
});
-unitTest(function globalThisEqualsSelf() {
+Deno.test(function globalThisEqualsSelf() {
assert(globalThis === self);
});
-unitTest(function globalThisInstanceofWindow() {
+Deno.test(function globalThisInstanceofWindow() {
assert(globalThis instanceof Window);
});
-unitTest(function globalThisConstructorLength() {
+Deno.test(function globalThisConstructorLength() {
assert(globalThis.constructor.length === 0);
});
-unitTest(function globalThisInstanceofEventTarget() {
+Deno.test(function globalThisInstanceofEventTarget() {
assert(globalThis instanceof EventTarget);
});
-unitTest(function navigatorInstanceofNavigator() {
+Deno.test(function navigatorInstanceofNavigator() {
// TODO(nayeemrmn): Add `Navigator` to deno_lint globals.
// deno-lint-ignore no-undef
assert(navigator instanceof Navigator);
});
-unitTest(function DenoNamespaceExists() {
+Deno.test(function DenoNamespaceExists() {
assert(Deno != null);
});
-unitTest(function DenoNamespaceEqualsWindowDeno() {
+Deno.test(function DenoNamespaceEqualsWindowDeno() {
assert(Deno === window.Deno);
});
-unitTest(function DenoNamespaceIsNotFrozen() {
+Deno.test(function DenoNamespaceIsNotFrozen() {
assert(!Object.isFrozen(Deno));
});
-unitTest(function webAssemblyExists() {
+Deno.test(function webAssemblyExists() {
assert(typeof WebAssembly.compile === "function");
});
@@ -78,14 +78,14 @@ declare global {
}
}
-unitTest(function DenoNamespaceConfigurable() {
+Deno.test(function DenoNamespaceConfigurable() {
const desc = Object.getOwnPropertyDescriptor(globalThis, "Deno");
assert(desc);
assert(desc.configurable);
assert(!desc.writable);
});
-unitTest(function DenoCoreNamespaceIsImmutable() {
+Deno.test(function DenoCoreNamespaceIsImmutable() {
const { print } = Deno.core;
try {
Deno.core.print = 1;
@@ -101,7 +101,7 @@ unitTest(function DenoCoreNamespaceIsImmutable() {
assert(print === Deno.core.print);
});
-unitTest(async function windowQueueMicrotask() {
+Deno.test(async function windowQueueMicrotask() {
let resolve1: () => void | undefined;
let resolve2: () => void | undefined;
let microtaskDone = false;
@@ -123,7 +123,7 @@ unitTest(async function windowQueueMicrotask() {
await p2;
});
-unitTest(function webApiGlobalThis() {
+Deno.test(function webApiGlobalThis() {
assert(globalThis.FormData !== null);
assert(globalThis.TextEncoder !== null);
assert(globalThis.TextEncoderStream !== null);