diff options
Diffstat (limited to 'cli/tests')
34 files changed, 37 insertions, 43 deletions
diff --git a/cli/tests/018_async_catch.ts b/cli/tests/018_async_catch.ts index a16f11696..85423ceda 100644 --- a/cli/tests/018_async_catch.ts +++ b/cli/tests/018_async_catch.ts @@ -6,7 +6,7 @@ async function call(): Promise<void> { console.log("before await fn()"); await fn(); console.log("after await fn()"); - } catch (error) { + } catch (_error) { console.log("catch"); } console.log("after try-catch"); diff --git a/cli/tests/038_checkjs.js b/cli/tests/038_checkjs.js index 628d3e376..f0856d94c 100644 --- a/cli/tests/038_checkjs.js +++ b/cli/tests/038_checkjs.js @@ -2,5 +2,4 @@ consol.log("hello world!"); // the following error should be ignored and not output to the console -// eslint-disable-next-line const foo = new Foo(); diff --git a/cli/tests/038_checkjs.js.out b/cli/tests/038_checkjs.js.out index 452290272..bd3fc3548 100644 --- a/cli/tests/038_checkjs.js.out +++ b/cli/tests/038_checkjs.js.out @@ -12,11 +12,11 @@ consol.log("hello world!"); TS2552 [ERROR]: Cannot find name 'Foo'. Did you mean 'foo'? const foo = new Foo(); ~~~ - at [WILDCARD]tests/038_checkjs.js:6:17 + at [WILDCARD]tests/038_checkjs.js:5:17 'foo' is declared here. const foo = new Foo(); ~~~ - at [WILDCARD]tests/038_checkjs.js:6:7 + at [WILDCARD]tests/038_checkjs.js:5:7 Found 2 errors. diff --git a/cli/tests/048_media_types_jsx.ts b/cli/tests/048_media_types_jsx.ts index c2ece995a..044963000 100644 --- a/cli/tests/048_media_types_jsx.ts +++ b/cli/tests/048_media_types_jsx.ts @@ -11,7 +11,6 @@ import { loaded as loadedJsx3 } from "http://localhost:4545/cli/tests/subdir/mt_ import { loaded as loadedJsx4 } from "http://localhost:4545/cli/tests/subdir/mt_application_x_javascript_jsx.j4.jsx"; declare global { - // deno-lint-ignore no-namespace namespace JSX { interface IntrinsicElements { // deno-lint-ignore no-explicit-any diff --git a/cli/tests/067_test_no_run_type_error.out b/cli/tests/067_test_no_run_type_error.out index f67ee6647..a09d04348 100644 --- a/cli/tests/067_test_no_run_type_error.out +++ b/cli/tests/067_test_no_run_type_error.out @@ -1,4 +1,4 @@ [WILDCARD]error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const a: string = 1; - ^ +const _a: string = 1; + ~~ at [WILDCARD]foo_test.ts[WILDCARD] diff --git a/cli/tests/076_info_json_deps_order.out b/cli/tests/076_info_json_deps_order.out index 615732e67..2d87a1054 100644 --- a/cli/tests/076_info_json_deps_order.out +++ b/cli/tests/076_info_json_deps_order.out @@ -10,10 +10,10 @@ "code": "file://[WILDCARD]/cli/tests/recursive_imports/A.ts" } ], - "size": 46, + "size": 81, "mediaType": "TypeScript", "local": "[WILDCARD]076_info_json_deps_order.ts", - "checksum": "88b144f362d31ac42263648aadef727dd36d039d3b8ac0248fdaff25d4de415a" + "checksum": "5dd40fe33e5924cca513489ce568e86c9b9fe318a87975403c8923629018680d" }, { "specifier": "file://[WILDCARD]/cli/tests/recursive_imports/A.ts", @@ -81,5 +81,5 @@ "checksum": "01b595d69514bfd001ba2cf421feabeaef559513f10697bf1a22781f8a8ed7f0" } ], - "size": 440 + "size": 475 }
\ No newline at end of file diff --git a/cli/tests/076_info_json_deps_order.ts b/cli/tests/076_info_json_deps_order.ts index f9d35fd5a..b1ae75e68 100644 --- a/cli/tests/076_info_json_deps_order.ts +++ b/cli/tests/076_info_json_deps_order.ts @@ -1 +1,2 @@ +// deno-lint-ignore no-unused-vars import { A } from "./recursive_imports/A.ts"; diff --git a/cli/tests/091_use_define_for_class_fields.ts b/cli/tests/091_use_define_for_class_fields.ts index 9be984abf..46be3ac0b 100644 --- a/cli/tests/091_use_define_for_class_fields.ts +++ b/cli/tests/091_use_define_for_class_fields.ts @@ -1,4 +1,4 @@ -class A { +class _A { b = this.a; constructor(public a: unknown) {} } diff --git a/cli/tests/deno_doc.ts b/cli/tests/deno_doc.ts index 92ba2f174..fb3c50957 100644 --- a/cli/tests/deno_doc.ts +++ b/cli/tests/deno_doc.ts @@ -1,4 +1,3 @@ /** Some JSDoc */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function foo() { } diff --git a/cli/tests/error_004_missing_module.ts b/cli/tests/error_004_missing_module.ts index ab5350408..82b281181 100644 --- a/cli/tests/error_004_missing_module.ts +++ b/cli/tests/error_004_missing_module.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import * as badModule from "./bad-module.ts"; console.log(badModule); diff --git a/cli/tests/error_004_missing_module.ts.out b/cli/tests/error_004_missing_module.ts.out index 1b3dd534f..474fdf8ed 100644 --- a/cli/tests/error_004_missing_module.ts.out +++ b/cli/tests/error_004_missing_module.ts.out @@ -1,2 +1,2 @@ [WILDCARD]error: Cannot resolve module "file:///[WILDCARD]cli/tests/bad-module.ts" from "file:///[WILDCARD]cli/tests/error_004_missing_module.ts". - at file:///[WILDCARD]cli/tests/error_004_missing_module.ts:2:0 + at file:///[WILDCARD]cli/tests/error_004_missing_module.ts:1:0 diff --git a/cli/tests/error_005_missing_dynamic_import.ts b/cli/tests/error_005_missing_dynamic_import.ts index 4c09feb5f..4ff10f275 100644 --- a/cli/tests/error_005_missing_dynamic_import.ts +++ b/cli/tests/error_005_missing_dynamic_import.ts @@ -1,4 +1,3 @@ (async (): Promise<void> => { - // eslint-disable-next-line - const badModule = await import("./bad-module.ts"); + const _badModule = await import("./bad-module.ts"); })(); diff --git a/cli/tests/error_005_missing_dynamic_import.ts.out b/cli/tests/error_005_missing_dynamic_import.ts.out index e21c7fffe..da680e195 100644 --- a/cli/tests/error_005_missing_dynamic_import.ts.out +++ b/cli/tests/error_005_missing_dynamic_import.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in promise) TypeError: Cannot resolve module "[WILDCARD]/cli/tests/bad-module.ts". - const badModule = await import("./bad-module.ts"); - ^ - at async file://[WILDCARD]/error_005_missing_dynamic_import.ts:3:21 + const _badModule = await import("./bad-module.ts"); + ^ + at async file://[WILDCARD]/error_005_missing_dynamic_import.ts:2:22 diff --git a/cli/tests/error_008_checkjs.js b/cli/tests/error_008_checkjs.js index 628d3e376..f0856d94c 100644 --- a/cli/tests/error_008_checkjs.js +++ b/cli/tests/error_008_checkjs.js @@ -2,5 +2,4 @@ consol.log("hello world!"); // the following error should be ignored and not output to the console -// eslint-disable-next-line const foo = new Foo(); diff --git a/cli/tests/error_011_bad_module_specifier.ts b/cli/tests/error_011_bad_module_specifier.ts index a9ccc4523..1c57e37a5 100644 --- a/cli/tests/error_011_bad_module_specifier.ts +++ b/cli/tests/error_011_bad_module_specifier.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import * as badModule from "bad-module.ts"; console.log(badModule); diff --git a/cli/tests/error_012_bad_dynamic_import_specifier.ts b/cli/tests/error_012_bad_dynamic_import_specifier.ts index 0420a80bf..1b538b787 100644 --- a/cli/tests/error_012_bad_dynamic_import_specifier.ts +++ b/cli/tests/error_012_bad_dynamic_import_specifier.ts @@ -1,4 +1,3 @@ (async (): Promise<void> => { - // eslint-disable-next-line - const badModule = await import("bad-module.ts"); + const _badModule = await import("bad-module.ts"); })(); diff --git a/cli/tests/error_012_bad_dynamic_import_specifier.ts.out b/cli/tests/error_012_bad_dynamic_import_specifier.ts.out index 15658a6eb..45bce8261 100644 --- a/cli/tests/error_012_bad_dynamic_import_specifier.ts.out +++ b/cli/tests/error_012_bad_dynamic_import_specifier.ts.out @@ -1,5 +1,5 @@ Check [WILDCARD]error_012_bad_dynamic_import_specifier.ts error: Uncaught (in promise) TypeError: relative import path "bad-module.ts" not prefixed with / or ./ or ../ Imported from "[WILDCARD]/error_012_bad_dynamic_import_specifier.ts" - const badModule = await import("bad-module.ts"); - ^ - at async file:///[WILDCARD]/error_012_bad_dynamic_import_specifier.ts:3:21 + const _badModule = await import("bad-module.ts"); + ^ + at async file:///[WILDCARD]/error_012_bad_dynamic_import_specifier.ts:2:22 diff --git a/cli/tests/file_exists.ts b/cli/tests/file_exists.ts index 5fc5414b3..20de4d4f2 100644 --- a/cli/tests/file_exists.ts +++ b/cli/tests/file_exists.ts @@ -1,6 +1,6 @@ try { await Deno.open(Deno.args[0]); Deno.exit(0); -} catch (e) { +} catch (_e) { Deno.exit(1); } diff --git a/cli/tests/heapstats.js b/cli/tests/heapstats.js index fba9e66d9..675fac2d6 100644 --- a/cli/tests/heapstats.js +++ b/cli/tests/heapstats.js @@ -14,6 +14,7 @@ function allocTest(alloc, allocAssert, deallocAssert) { const t1 = sample(); // Alloc + // deno-lint-ignore no-unused-vars let x = alloc(); const t2 = sample(); allocAssert(delta(t1, t2)); diff --git a/cli/tests/no_validate_asm.js b/cli/tests/no_validate_asm.js index 38ea0a446..ef999e080 100644 --- a/cli/tests/no_validate_asm.js +++ b/cli/tests/no_validate_asm.js @@ -1,7 +1,7 @@ // V8 logs any asmjs validation errors to stdout, but it shows line numbers that // are non-existent in the source. -const asmJsModule = function () { +const _asmJsModule = function () { "use asm"; function func( diff --git a/cli/tests/resolve_dns.ts b/cli/tests/resolve_dns.ts index 7865d9680..d765e0536 100644 --- a/cli/tests/resolve_dns.ts +++ b/cli/tests/resolve_dns.ts @@ -37,6 +37,6 @@ console.log(JSON.stringify(txt)); try { await Deno.resolveDns("not-found-example.com", "A", nameServer); -} catch (e) { +} catch (_e) { console.log("Error thrown for not-found-example.com"); } diff --git a/cli/tests/test/unhandled_rejection.ts b/cli/tests/test/unhandled_rejection.ts index 396e1c09d..32f3111ea 100644 --- a/cli/tests/test/unhandled_rejection.ts +++ b/cli/tests/test/unhandled_rejection.ts @@ -1,3 +1,3 @@ -new Promise((resolve, reject) => { +new Promise((_resolve, reject) => { reject(new Error("rejection")); }); diff --git a/cli/tests/test_type_error/foo_test.ts b/cli/tests/test_type_error/foo_test.ts index 68d1afccf..4b9404558 100644 --- a/cli/tests/test_type_error/foo_test.ts +++ b/cli/tests/test_type_error/foo_test.ts @@ -1 +1 @@ -const a: string = 1; +const _a: string = 1; diff --git a/cli/tests/unit/opcall_test.ts b/cli/tests/unit/opcall_test.ts index 6bade6545..bd549570e 100644 --- a/cli/tests/unit/opcall_test.ts +++ b/cli/tests/unit/opcall_test.ts @@ -17,7 +17,7 @@ unitTest(async function sendAsyncStackTrace() { declare global { namespace Deno { // deno-lint-ignore no-explicit-any - var core: any; // eslint-disable-line no-var + var core: any; } } diff --git a/cli/tests/workers/bench_large_message.ts b/cli/tests/workers/bench_large_message.ts index 53076e711..7f6cb26ce 100644 --- a/cli/tests/workers/bench_large_message.ts +++ b/cli/tests/workers/bench_large_message.ts @@ -7,7 +7,7 @@ function oneWorker(i: number) { new URL("worker_large_message.js", import.meta.url).href, { type: "module" }, ); - worker.onmessage = (e): void => { + worker.onmessage = (_e): void => { if (countDown > 0) { countDown--; return; diff --git a/cli/tests/workers/permissions_blob_local.ts.out b/cli/tests/workers/permissions_blob_local.ts.out index fab2388d8..0f6ae1435 100644 --- a/cli/tests/workers/permissions_blob_local.ts.out +++ b/cli/tests/workers/permissions_blob_local.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires read access to "[WILDCARD]local_file.ts", run again with the --allow-read flag at blob:null/[WILDCARD]:1:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_blob_remote.ts.out b/cli/tests/workers/permissions_blob_remote.ts.out index c89f7b41c..751218ba4 100644 --- a/cli/tests/workers/permissions_blob_remote.ts.out +++ b/cli/tests/workers/permissions_blob_remote.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires net access to "example.com", run again with the --allow-net flag at blob:null/[WILDCARD]:1:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_data_local.ts.out b/cli/tests/workers/permissions_data_local.ts.out index a1e1de8ab..00a251659 100644 --- a/cli/tests/workers/permissions_data_local.ts.out +++ b/cli/tests/workers/permissions_data_local.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires read access to "[WILDCARD]local_file.ts", run again with the --allow-read flag at data:application/javascript;base64,[WILDCARD]:1:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_data_remote.ts.out b/cli/tests/workers/permissions_data_remote.ts.out index 2c4080672..f2b5fa48b 100644 --- a/cli/tests/workers/permissions_data_remote.ts.out +++ b/cli/tests/workers/permissions_data_remote.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires net access to "example.com", run again with the --allow-net flag at data:application/javascript;base64,aW1wb3J0ICJodHRwczovL2V4YW1wbGUuY29tL3NvbWUvZmlsZS50cyI7:1:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_dynamic_remote.ts.out b/cli/tests/workers/permissions_dynamic_remote.ts.out index 8600fa191..63a8af51f 100644 --- a/cli/tests/workers/permissions_dynamic_remote.ts.out +++ b/cli/tests/workers/permissions_dynamic_remote.ts.out @@ -3,4 +3,4 @@ await import("https://example.com/some/file.ts"); ^ at async http://localhost:4545/cli/tests/workers/dynamic_remote.ts:2:1 [WILDCARD]error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_remote_remote.ts.out b/cli/tests/workers/permissions_remote_remote.ts.out index 714150a3a..964f8b8e9 100644 --- a/cli/tests/workers/permissions_remote_remote.ts.out +++ b/cli/tests/workers/permissions_remote_remote.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires net access to "example.com", run again with the --allow-net flag at http://localhost:4545/cli/tests/workers/static_remote.ts:2:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/test.ts b/cli/tests/workers/test.ts index 954737b3a..bf1e46a34 100644 --- a/cli/tests/workers/test.ts +++ b/cli/tests/workers/test.ts @@ -198,7 +198,7 @@ Deno.test({ { type: "module" }, ); - racyWorker.onmessage = (e): void => { + racyWorker.onmessage = (_e): void => { setTimeout(() => { promise.resolve(); }, 100); @@ -353,7 +353,7 @@ Deno.test({ ); const arr: number[] = []; w.addEventListener("message", () => arr.push(1)); - w.onmessage = (e): void => { + w.onmessage = (_e): void => { arr.push(2); }; w.addEventListener("message", () => arr.push(3)); diff --git a/cli/tests/workers/worker_large_message.js b/cli/tests/workers/worker_large_message.js index f7b7da8a0..a1ddae4f9 100644 --- a/cli/tests/workers/worker_large_message.js +++ b/cli/tests/workers/worker_large_message.js @@ -3,7 +3,7 @@ const dataSmall = ""; const dataLarge = "x".repeat(10 * 1024); -onmessage = function (e) { +onmessage = function (_e) { for (let i = 0; i <= 10; i++) { if (i % 2 == 0) { postMessage(dataLarge); diff --git a/cli/tests/workers/worker_with_top_level_await.ts b/cli/tests/workers/worker_with_top_level_await.ts index 6c5528900..bc77c7932 100644 --- a/cli/tests/workers/worker_with_top_level_await.ts +++ b/cli/tests/workers/worker_with_top_level_await.ts @@ -6,7 +6,7 @@ function delay(ms: number): Promise<void> { }); } -onmessage = (e: MessageEvent) => { +onmessage = (_e: MessageEvent) => { postMessage("triggered worker handler"); close(); }; |