mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 20:59:10 +00:00
fix(std/node): correct typings for global, globalThis, window (#8363)
This commit is contained in:
parent
e3c3fc58cb
commit
315d889afa
5 changed files with 89 additions and 31 deletions
|
@ -1,19 +1,7 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { assert, assertEquals, assertThrows } from "../testing/asserts.ts";
|
||||
import { assertEquals, assertThrows } from "../testing/asserts.ts";
|
||||
import { Buffer } from "./buffer.ts";
|
||||
|
||||
Deno.test({
|
||||
name: "Buffer global scope",
|
||||
fn() {
|
||||
// deno-lint-ignore ban-ts-comment
|
||||
// @ts-expect-error
|
||||
assert(window.Buffer === Buffer);
|
||||
// deno-lint-ignore ban-ts-comment
|
||||
// @ts-expect-error
|
||||
assert(globalThis.Buffer === Buffer);
|
||||
},
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "alloc fails on negative numbers",
|
||||
fn() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue