summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-08-20 15:14:37 -0400
committerGitHub <noreply@github.com>2024-08-20 15:14:37 -0400
commita7c002ae634b20a2f84c90417327a88c9ac2df99 (patch)
treec21a179412ee70f59eb0c38acfbe5d4998870224 /tests
parent2f47b4d1fd8e37a5e45bc1b8f3623708e0f95e2e (diff)
chore: enable no-console dlint rule (#25113)
Diffstat (limited to 'tests')
-rw-r--r--tests/ffi/tests/event_loop_integration.ts2
-rw-r--r--tests/ffi/tests/ffi_callback_errors.ts2
-rw-r--r--tests/napi/cleanup_hook_test.js2
-rwxr-xr-xtests/node_compat/runner/setup.ts2
-rw-r--r--tests/node_compat/test.ts2
-rw-r--r--tests/node_compat/test/fixtures/child-process-spawn-node.js4
-rw-r--r--tests/unit/console_test.ts2
-rw-r--r--tests/unit/fetch_test.ts3
-rw-r--r--tests/unit/serve_test.ts2
-rw-r--r--tests/unit/timers_test.ts3
-rw-r--r--tests/unit/worker_test.ts2
-rw-r--r--tests/unit_node/_fs/_fs_write_test.ts3
-rw-r--r--tests/unit_node/http2_test.ts2
-rw-r--r--tests/unit_node/http_test.ts2
-rw-r--r--tests/unit_node/net_test.ts2
-rw-r--r--tests/unit_node/process_test.ts3
-rwxr-xr-xtests/wpt/wpt.ts2
17 files changed, 36 insertions, 4 deletions
diff --git a/tests/ffi/tests/event_loop_integration.ts b/tests/ffi/tests/event_loop_integration.ts
index d9ada6027..e3914d966 100644
--- a/tests/ffi/tests/event_loop_integration.ts
+++ b/tests/ffi/tests/event_loop_integration.ts
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
const targetDir = Deno.execPath().replace(/[^\/\\]+$/, "");
const [libPrefix, libSuffix] = {
darwin: ["lib", "dylib"],
diff --git a/tests/ffi/tests/ffi_callback_errors.ts b/tests/ffi/tests/ffi_callback_errors.ts
index dbd60636c..797ff236c 100644
--- a/tests/ffi/tests/ffi_callback_errors.ts
+++ b/tests/ffi/tests/ffi_callback_errors.ts
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
const targetDir = Deno.execPath().replace(/[^\/\\]+$/, "");
const [libPrefix, libSuffix] = {
darwin: ["lib", "dylib"],
diff --git a/tests/napi/cleanup_hook_test.js b/tests/napi/cleanup_hook_test.js
index 0d83bc5b4..017674ad4 100644
--- a/tests/napi/cleanup_hook_test.js
+++ b/tests/napi/cleanup_hook_test.js
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
import { assertEquals, loadTestLibrary } from "./common.js";
const properties = loadTestLibrary();
diff --git a/tests/node_compat/runner/setup.ts b/tests/node_compat/runner/setup.ts
index 95fee6a20..37f1aba9b 100755
--- a/tests/node_compat/runner/setup.ts
+++ b/tests/node_compat/runner/setup.ts
@@ -1,6 +1,8 @@
#!/usr/bin/env -S deno run --allow-read=. --allow-write=. --allow-run=git --config=tests/config/deno.json
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
/** This copies the test files according to the config file `tests/node_compat/config.jsonc` */
import { walk } from "@std/fs/walk";
diff --git a/tests/node_compat/test.ts b/tests/node_compat/test.ts
index b5c9514a3..f6db4ee1a 100644
--- a/tests/node_compat/test.ts
+++ b/tests/node_compat/test.ts
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
/**
* This script will run the test files specified in the configuration file.
*
diff --git a/tests/node_compat/test/fixtures/child-process-spawn-node.js b/tests/node_compat/test/fixtures/child-process-spawn-node.js
index da2b557c9..d403aabf9 100644
--- a/tests/node_compat/test/fixtures/child-process-spawn-node.js
+++ b/tests/node_compat/test/fixtures/child-process-spawn-node.js
@@ -1,7 +1,5 @@
const assert = require("assert");
-// TODO(kt3k): Uncomment this when util.debuglog is added
-// const debug = require('util').debuglog('test');
-const debug = console.log;
+const debug = require('util').debuglog('test');
function onmessage(m) {
debug("CHILD got message:", m);
diff --git a/tests/unit/console_test.ts b/tests/unit/console_test.ts
index c13362419..63ffff0dc 100644
--- a/tests/unit/console_test.ts
+++ b/tests/unit/console_test.ts
@@ -8,6 +8,8 @@
// std/fmt/colors auto determines whether to put colors in or not. We need
// better infrastructure here so we can properly test the colors.
+// deno-lint-ignore-file no-console
+
import {
assert,
assertEquals,
diff --git a/tests/unit/fetch_test.ts b/tests/unit/fetch_test.ts
index 9b2463bcc..aa4ff3067 100644
--- a/tests/unit/fetch_test.ts
+++ b/tests/unit/fetch_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-console
+
import {
assert,
assertEquals,
diff --git a/tests/unit/serve_test.ts b/tests/unit/serve_test.ts
index 353621154..827a094dc 100644
--- a/tests/unit/serve_test.ts
+++ b/tests/unit/serve_test.ts
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
import { assertMatch, assertRejects } from "@std/assert";
import { Buffer, BufReader, BufWriter } from "@std/io";
import { TextProtoReader } from "../testdata/run/textproto.ts";
diff --git a/tests/unit/timers_test.ts b/tests/unit/timers_test.ts
index 6e829c07f..70619ae35 100644
--- a/tests/unit/timers_test.ts
+++ b/tests/unit/timers_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-console
+
import {
assert,
assertEquals,
diff --git a/tests/unit/worker_test.ts b/tests/unit/worker_test.ts
index 526618d54..e5966348f 100644
--- a/tests/unit/worker_test.ts
+++ b/tests/unit/worker_test.ts
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
// Requires to be run with `--allow-net` flag
import { assert, assertEquals, assertMatch, assertThrows } from "@std/assert";
diff --git a/tests/unit_node/_fs/_fs_write_test.ts b/tests/unit_node/_fs/_fs_write_test.ts
index a140548e1..2b07d600b 100644
--- a/tests/unit_node/_fs/_fs_write_test.ts
+++ b/tests/unit_node/_fs/_fs_write_test.ts
@@ -1,4 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+// deno-lint-ignore-file no-console
+
import { write, writeSync } from "node:fs";
import { assertEquals } from "@std/assert";
import { Buffer } from "node:buffer";
diff --git a/tests/unit_node/http2_test.ts b/tests/unit_node/http2_test.ts
index 7cffd0432..8e98bd28d 100644
--- a/tests/unit_node/http2_test.ts
+++ b/tests/unit_node/http2_test.ts
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
import * as http2 from "node:http2";
import { Buffer } from "node:buffer";
import { readFile } from "node:fs/promises";
diff --git a/tests/unit_node/http_test.ts b/tests/unit_node/http_test.ts
index ec20ec7d7..2043a0004 100644
--- a/tests/unit_node/http_test.ts
+++ b/tests/unit_node/http_test.ts
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
import EventEmitter from "node:events";
import http, { type RequestOptions, type ServerResponse } from "node:http";
import url from "node:url";
diff --git a/tests/unit_node/net_test.ts b/tests/unit_node/net_test.ts
index 521de1e73..f49ff0ef0 100644
--- a/tests/unit_node/net_test.ts
+++ b/tests/unit_node/net_test.ts
@@ -1,5 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
import * as net from "node:net";
import { assert, assertEquals } from "@std/assert";
import * as path from "@std/path";
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts
index cc9e4dbd4..a647b0369 100644
--- a/tests/unit_node/process_test.ts
+++ b/tests/unit_node/process_test.ts
@@ -1,6 +1,7 @@
-// deno-lint-ignore-file no-undef
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-undef no-console
+
import process, {
arch as importedArch,
argv,
diff --git a/tests/wpt/wpt.ts b/tests/wpt/wpt.ts
index 8879de133..c42ff51e6 100755
--- a/tests/wpt/wpt.ts
+++ b/tests/wpt/wpt.ts
@@ -1,6 +1,8 @@
#!/usr/bin/env -S deno run --allow-write --allow-read --allow-net --allow-env --allow-run --config=tests/config/deno.json
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+// deno-lint-ignore-file no-console
+
// This script is used to run WPT tests for Deno.
import {