summaryrefslogtreecommitdiff
path: root/std/node/buffer_test.ts
diff options
context:
space:
mode:
authorTrivikram Kamat <16024985+trivikr@users.noreply.github.com>2020-07-26 07:41:10 -0700
committerGitHub <noreply@github.com>2020-07-26 10:41:10 -0400
commit35a1421fb1b8407a13e33081ad2dbc05460e7452 (patch)
tree67693177bccdf783a73e053143bf2cf63deea082 /std/node/buffer_test.ts
parent9f3ab4dca7ed5c810352b67fce24aa800defc5a6 (diff)
chore: use ts-expect-error instead of ts-ignore (#6876)
Diffstat (limited to 'std/node/buffer_test.ts')
-rw-r--r--std/node/buffer_test.ts20
1 files changed, 6 insertions, 14 deletions
diff --git a/std/node/buffer_test.ts b/std/node/buffer_test.ts
index 5d01a4b67..a72569b7c 100644
--- a/std/node/buffer_test.ts
+++ b/std/node/buffer_test.ts
@@ -5,10 +5,10 @@ Deno.test({
name: "Buffer global scope",
fn() {
// deno-lint-ignore ban-ts-comment
- // @ts-ignore
+ // @ts-expect-error
assert(window.Buffer === Buffer);
// deno-lint-ignore ban-ts-comment
- // @ts-ignore
+ // @ts-expect-error
assert(globalThis.Buffer === Buffer);
},
});
@@ -36,7 +36,7 @@ Deno.test({
assertThrows(
() => {
// deno-lint-ignore ban-ts-comment
- // @ts-ignore
+ // @ts-expect-error
Buffer.alloc(size);
},
TypeError,
@@ -55,8 +55,6 @@ Deno.test({
for (const value of invalidValues) {
assertThrows(
() => {
- // deno-lint-ignore ban-ts-comment
- // @ts-ignore
console.log(value.constructor.name);
Buffer.alloc(1, value);
},
@@ -399,7 +397,7 @@ Deno.test({
assertThrows(
() => {
// deno-lint-ignore ban-ts-comment
- // @ts-ignore
+ // @ts-expect-error
buffer.toString(encoding);
},
TypeError,
@@ -418,15 +416,13 @@ Deno.test({
for (const encoding of defaultToUtf8Encodings) {
// deno-lint-ignore ban-ts-comment
- // @ts-ignore
+ // @ts-expect-error
assertEquals(Buffer.from("yes", encoding).toString(), "yes");
}
for (const encoding of invalidEncodings) {
assertThrows(
() => {
- // deno-lint-ignore ban-ts-comment
- // @ts-ignore
Buffer.from("yes", encoding);
},
TypeError,
@@ -445,8 +441,6 @@ Deno.test({
for (const encoding of notImplemented) {
assertThrows(
() => {
- // deno-lint-ignore ban-ts-comment
- // @ts-ignore
buffer.toString(encoding);
},
Error,
@@ -456,8 +450,6 @@ Deno.test({
assertThrows(
() => {
- // deno-lint-ignore ban-ts-comment
- // @ts-ignore
Buffer.from("", encoding);
},
Error,
@@ -586,7 +578,7 @@ Deno.test({
assertThrows(
// deno-lint-ignore ban-ts-comment
- // @ts-ignore
+ // @ts-expect-error
() => Buffer.alloc(1).equals("abc"),
TypeError,
`The "otherBuffer" argument must be an instance of Buffer or Uint8Array. Received type string`,