fix(std/node): correct typings for global, globalThis, window (#8363)

This commit is contained in:
Steven Guerrero 2020-11-19 07:23:42 -05:00 committed by GitHub
parent e3c3fc58cb
commit 315d889afa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 89 additions and 31 deletions

View file

@ -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() {