diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-02-02 19:05:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 12:05:46 +0100 |
commit | 6abf126c2a7a451cded8c6b5e6ddf1b69c84055d (patch) | |
tree | fd94c013a19fcb38954844085821ec1601c20e18 /std/node/global_test.ts | |
parent | a2b5d44f1aa9d64f448a2a3cc2001272e2f60b98 (diff) |
chore: remove std directory (#9361)
This removes the std folder from the tree.
Various parts of the tests are pretty tightly dependent
on std (47 direct imports and 75 indirect imports, not
counting the cli tests that use them as fixtures) so I've
added std as a submodule for now.
Diffstat (limited to 'std/node/global_test.ts')
-rw-r--r-- | std/node/global_test.ts | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/std/node/global_test.ts b/std/node/global_test.ts deleted file mode 100644 index 2ff768f88..000000000 --- a/std/node/global_test.ts +++ /dev/null @@ -1,71 +0,0 @@ -import "./global.ts"; -import { assert, assertStrictEquals } from "../testing/asserts.ts"; -import { Buffer as BufferModule } from "./buffer.ts"; -import processModule from "./process.ts"; -import timers from "./timers.ts"; - -// Definitions for this are quite delicate -// This ensures modifications to the global namespace don't break on TypeScript - -// TODO(bartlomieju): -// Deno lint marks globals defined by this module as undefined -// probably gonna change in the future - -Deno.test("global is correctly defined", () => { - // deno-lint-ignore no-undef - assertStrictEquals(global, globalThis); - // deno-lint-ignore no-undef - assertStrictEquals(global.Buffer, BufferModule); - // deno-lint-ignore no-undef - assertStrictEquals(global.process, process); -}); - -Deno.test("Buffer is correctly defined", () => { - //Check that Buffer is defined as a type as well - type x = Buffer; - // deno-lint-ignore no-undef - assertStrictEquals(Buffer, BufferModule); - // deno-lint-ignore no-undef - assert(Buffer.from); - // deno-lint-ignore no-undef - assertStrictEquals(global.Buffer, BufferModule); - // deno-lint-ignore no-undef - assert(global.Buffer.from); - assertStrictEquals(globalThis.Buffer, BufferModule); - assert(globalThis.Buffer.from); - assertStrictEquals(window.Buffer, BufferModule); - assert(window.Buffer.from); -}); - -Deno.test("process is correctly defined", () => { - // deno-lint-ignore no-undef - assertStrictEquals(process, processModule); - // deno-lint-ignore no-undef - assert(process.arch); - // deno-lint-ignore no-undef - assertStrictEquals(global.process, processModule); - // deno-lint-ignore no-undef - assert(global.process.arch); - assertStrictEquals(globalThis.process, processModule); - assert(globalThis.process.arch); - assertStrictEquals(window.process, processModule); - assert(window.process.arch); -}); - -Deno.test("setImmediate is correctly defined", () => { - // deno-lint-ignore no-undef - assertStrictEquals(setImmediate, timers.setImmediate); - // deno-lint-ignore no-undef - assertStrictEquals(global.setImmediate, timers.setImmediate); - assertStrictEquals(globalThis.setImmediate, timers.setImmediate); - assertStrictEquals(window.setImmediate, timers.setImmediate); -}); - -Deno.test("clearImmediate is correctly defined", () => { - // deno-lint-ignore no-undef - assertStrictEquals(clearImmediate, timers.clearImmediate); - // deno-lint-ignore no-undef - assertStrictEquals(global.clearImmediate, timers.clearImmediate); - assertStrictEquals(globalThis.clearImmediate, timers.clearImmediate); - assertStrictEquals(window.clearImmediate, timers.clearImmediate); -}); |