summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-06-05 00:09:29 +0100
committerGitHub <noreply@github.com>2024-06-05 01:09:29 +0200
commiteb218c0f3344eabfa8abf4c7ecac148f14fc6294 (patch)
tree10a8f125b79830e02e568e1cf7b0c63976616fb5 /tests
parent29a075de2b625e1c893f6fad163a6d6937894a7a (diff)
chore: upgrade dlint to 0.60.0 (#24041)
Factoring out `dlint` upgrade from https://github.com/denoland/deno/pull/24034 as it requires us to change the lint step on mac to use ARM runners. --------- Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/testdata/import_attributes/dynamic_import.ts1
-rw-r--r--tests/testdata/import_attributes/json_with_shebang.ts1
-rw-r--r--tests/testdata/import_attributes/static_import.ts1
-rw-r--r--tests/testdata/import_attributes/type_check.out4
-rw-r--r--tests/testdata/import_attributes/type_check.ts1
-rw-r--r--tests/testdata/workers/http_worker.js3
-rw-r--r--tests/unit/command_test.ts2
-rw-r--r--tests/unit/event_target_test.ts10
-rw-r--r--tests/unit/globals_test.ts3
-rw-r--r--tests/unit/http_test.ts5
-rw-r--r--tests/unit/resources_test.ts3
-rw-r--r--tests/unit/stat_test.ts3
-rw-r--r--tests/unit/tty_test.ts3
-rw-r--r--tests/unit/utime_test.ts3
-rw-r--r--tests/unit_node/_fs/_fs_fstat_test.ts3
-rw-r--r--tests/unit_node/crypto/crypto_cipher_gcm_test.ts4
16 files changed, 36 insertions, 14 deletions
diff --git a/tests/testdata/import_attributes/dynamic_import.ts b/tests/testdata/import_attributes/dynamic_import.ts
index 73f348697..afff52e1a 100644
--- a/tests/testdata/import_attributes/dynamic_import.ts
+++ b/tests/testdata/import_attributes/dynamic_import.ts
@@ -1,4 +1,5 @@
const data1 = await import("./data.json", { with: { type: "json" } });
+// deno-lint-ignore no-import-assertions
const data2 = await import("./data.json", { assert: { type: "json" } });
console.log(data1);
diff --git a/tests/testdata/import_attributes/json_with_shebang.ts b/tests/testdata/import_attributes/json_with_shebang.ts
index 523bf8772..0a785210f 100644
--- a/tests/testdata/import_attributes/json_with_shebang.ts
+++ b/tests/testdata/import_attributes/json_with_shebang.ts
@@ -1,3 +1,4 @@
+// deno-lint-ignore no-import-assertions
import json from "./json_with_shebang.json" assert { type: "json" };
console.log(json);
diff --git a/tests/testdata/import_attributes/static_import.ts b/tests/testdata/import_attributes/static_import.ts
index d46d93b4a..1538a4a2f 100644
--- a/tests/testdata/import_attributes/static_import.ts
+++ b/tests/testdata/import_attributes/static_import.ts
@@ -1,4 +1,5 @@
import data1 from "./data.json" with { type: "json" };
+// deno-lint-ignore no-import-assertions
import data2 from "./data.json" assert { type: "json" };
console.log(data1);
diff --git a/tests/testdata/import_attributes/type_check.out b/tests/testdata/import_attributes/type_check.out
index 5ecdec82d..2fc26dae3 100644
--- a/tests/testdata/import_attributes/type_check.out
+++ b/tests/testdata/import_attributes/type_check.out
@@ -2,11 +2,11 @@ Check file:///[WILDCARD]/type_check.ts
error: TS2339 [ERROR]: Property 'foo' does not exist on type '{ a: string; c: { d: number; }; }'.
console.log(data1.foo);
~~~
- at [WILDCARD]type_check.ts:4:19
+ at [WILDCARD]type_check.ts:5:19
TS2339 [ERROR]: Property 'foo' does not exist on type '{ a: string; c: { d: number; }; }'.
console.log(data2.foo);
~~~
- at [WILDCARD]type_check.ts:5:19
+ at [WILDCARD]type_check.ts:6:19
Found 2 errors.
diff --git a/tests/testdata/import_attributes/type_check.ts b/tests/testdata/import_attributes/type_check.ts
index ddf28e67a..36e47bd5b 100644
--- a/tests/testdata/import_attributes/type_check.ts
+++ b/tests/testdata/import_attributes/type_check.ts
@@ -1,4 +1,5 @@
import data1 from "./data.json" with { type: "json" };
+// deno-lint-ignore no-import-assertions
import data2 from "./data.json" assert { type: "json" };
console.log(data1.foo);
diff --git a/tests/testdata/workers/http_worker.js b/tests/testdata/workers/http_worker.js
index 3cd1625ab..c617e2e92 100644
--- a/tests/testdata/workers/http_worker.js
+++ b/tests/testdata/workers/http_worker.js
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-deprecated-deno-api
+
const listener = Deno.listen({ hostname: "127.0.0.1", port: 4506 });
postMessage("ready");
for await (const conn of listener) {
diff --git a/tests/unit/command_test.ts b/tests/unit/command_test.ts
index 770a568c4..dd8352547 100644
--- a/tests/unit/command_test.ts
+++ b/tests/unit/command_test.ts
@@ -269,8 +269,6 @@ Deno.test(
Deno.test(
{ permissions: { run: true, read: true } },
- // deno lint bug, see https://github.com/denoland/deno_lint/issues/1206
- // deno-lint-ignore require-await
async function childProcessExplicitResourceManagement() {
let dead = undefined;
{
diff --git a/tests/unit/event_target_test.ts b/tests/unit/event_target_test.ts
index b084eaf90..3577587d1 100644
--- a/tests/unit/event_target_test.ts
+++ b/tests/unit/event_target_test.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-// deno-lint-ignore-file no-window-prefix
+
import { assertEquals, assertThrows } from "./test_util.ts";
Deno.test(function addEventListenerTest() {
@@ -134,18 +134,18 @@ Deno.test(function eventTargetThisShouldDefaultToWindow() {
};
addEventListener("hello", listener);
- window.dispatchEvent(event);
+ globalThis.dispatchEvent(event);
assertEquals(n, 2);
n = 1;
removeEventListener("hello", listener);
- window.dispatchEvent(event);
+ globalThis.dispatchEvent(event);
assertEquals(n, 1);
- window.addEventListener("hello", listener);
+ globalThis.addEventListener("hello", listener);
dispatchEvent(event);
assertEquals(n, 2);
n = 1;
- window.removeEventListener("hello", listener);
+ globalThis.removeEventListener("hello", listener);
dispatchEvent(event);
assertEquals(n, 1);
});
diff --git a/tests/unit/globals_test.ts b/tests/unit/globals_test.ts
index 00be3f451..8e07cf005 100644
--- a/tests/unit/globals_test.ts
+++ b/tests/unit/globals_test.ts
@@ -1,5 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-// deno-lint-ignore-file no-window-prefix
+
+// deno-lint-ignore-file no-window-prefix no-window
import { assert, assertEquals, assertRejects } from "./test_util.ts";
Deno.test(function globalThisExists() {
diff --git a/tests/unit/http_test.ts b/tests/unit/http_test.ts
index f4fa62fa6..6968c6f88 100644
--- a/tests/unit/http_test.ts
+++ b/tests/unit/http_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-deprecated-deno-api
+
import { Buffer, BufReader, BufWriter } from "@std/io/mod.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import {
@@ -2094,7 +2097,6 @@ Deno.test({
"--header",
"Accept-Encoding: deflate, gzip",
];
- // deno-lint-ignore no-deprecated-deno-api
const proc = Deno.run({ cmd, stdout: "piped", stderr: "null" });
const status = await proc.status();
assert(status.success);
@@ -2157,7 +2159,6 @@ Deno.test({
"--header",
"Accept-Encoding: deflate, gzip",
];
- // deno-lint-ignore no-deprecated-deno-api
const proc = Deno.run({ cmd, stdout: "piped", stderr: "null" });
const status = await proc.status();
assert(status.success);
diff --git a/tests/unit/resources_test.ts b/tests/unit/resources_test.ts
index bb0b9f2f8..921a8af8f 100644
--- a/tests/unit/resources_test.ts
+++ b/tests/unit/resources_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-deprecated-deno-api
+
import { assert, assertEquals, assertThrows } from "./test_util.ts";
const listenPort = 4505;
diff --git a/tests/unit/stat_test.ts b/tests/unit/stat_test.ts
index 6882edf25..e64b47536 100644
--- a/tests/unit/stat_test.ts
+++ b/tests/unit/stat_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-deprecated-deno-api
+
import {
assert,
assertEquals,
diff --git a/tests/unit/tty_test.ts b/tests/unit/tty_test.ts
index f135ae7cf..0c1140804 100644
--- a/tests/unit/tty_test.ts
+++ b/tests/unit/tty_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-deprecated-deno-api
+
import { assert } from "./test_util.ts";
// Note tests for Deno.stdin.setRaw is in integration tests.
diff --git a/tests/unit/utime_test.ts b/tests/unit/utime_test.ts
index 9f5f25bee..49bc96623 100644
--- a/tests/unit/utime_test.ts
+++ b/tests/unit/utime_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-deprecated-deno-api
+
import {
assertEquals,
assertRejects,
diff --git a/tests/unit_node/_fs/_fs_fstat_test.ts b/tests/unit_node/_fs/_fs_fstat_test.ts
index 37f79f475..1464b05c5 100644
--- a/tests/unit_node/_fs/_fs_fstat_test.ts
+++ b/tests/unit_node/_fs/_fs_fstat_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-deprecated-deno-api
+
import { fstat, fstatSync } from "node:fs";
import { fail } from "@std/assert/mod.ts";
import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts";
diff --git a/tests/unit_node/crypto/crypto_cipher_gcm_test.ts b/tests/unit_node/crypto/crypto_cipher_gcm_test.ts
index 57e40d2ac..f25c81036 100644
--- a/tests/unit_node/crypto/crypto_cipher_gcm_test.ts
+++ b/tests/unit_node/crypto/crypto_cipher_gcm_test.ts
@@ -2,8 +2,8 @@
import crypto from "node:crypto";
import { Buffer } from "node:buffer";
-import testVectors128 from "./gcmEncryptExtIV128.json" assert { type: "json" };
-import testVectors256 from "./gcmEncryptExtIV256.json" assert { type: "json" };
+import testVectors128 from "./gcmEncryptExtIV128.json" with { type: "json" };
+import testVectors256 from "./gcmEncryptExtIV256.json" with { type: "json" };
import { assertEquals } from "@std/assert/mod.ts";
const aesGcm = (bits: string, key: Uint8Array) => {