diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/repl_tests.rs | 1 | ||||
-rw-r--r-- | cli/tests/integration/run_tests.rs | 2 | ||||
-rw-r--r-- | cli/tests/testdata/coverage/complex_test.ts | 2 | ||||
-rw-r--r-- | cli/tests/testdata/run/error_005_missing_dynamic_import.ts.out | 1 | ||||
-rw-r--r-- | cli/tests/testdata/run/error_015_dynamic_import_permissions.out | 1 | ||||
-rw-r--r-- | cli/tests/testdata/run/reference_types_error.js.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/test/captured_output.ts | 1 | ||||
-rw-r--r-- | cli/tests/testdata/workers/permissions_dynamic_remote.ts.out | 1 | ||||
-rw-r--r-- | cli/tests/unit/http_test.ts | 2 | ||||
-rw-r--r-- | cli/tests/unit/process_test.ts | 29 |
10 files changed, 41 insertions, 1 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index 43e601739..5e3610842 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -6,6 +6,7 @@ use test_util::assert_ends_with; use test_util::assert_not_contains; use util::TempDir; +#[ignore] #[test] fn pty_multiline() { util::with_pty(&["repl"], |mut console| { diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 9c0319a7f..3f2b8d81f 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -3788,6 +3788,7 @@ itest!(permission_args_quiet { }); // Regression test for https://github.com/denoland/deno/issues/16772 +#[ignore] #[test] fn file_fetcher_preserves_permissions() { let _guard = util::http_server(); @@ -3804,6 +3805,7 @@ fn file_fetcher_preserves_permissions() { }); } +#[ignore] #[test] fn stdio_streams_are_locked_in_permission_prompt() { let _guard = util::http_server(); diff --git a/cli/tests/testdata/coverage/complex_test.ts b/cli/tests/testdata/coverage/complex_test.ts index 1202289cb..d6e9c2691 100644 --- a/cli/tests/testdata/coverage/complex_test.ts +++ b/cli/tests/testdata/coverage/complex_test.ts @@ -7,6 +7,7 @@ Deno.test("complex", function () { Deno.test("sub process with stdin", async () => { // ensure launching deno run with stdin doesn't affect coverage const code = "console.log('5')"; + // deno-lint-ignore no-deprecated-deno-api const p = await Deno.run({ cmd: [Deno.execPath(), "run", "-"], stdin: "piped", @@ -25,6 +26,7 @@ Deno.test("sub process with stdin", async () => { Deno.test("sub process with deno eval", async () => { // ensure launching deno eval doesn't affect coverage const code = "console.log('5')"; + // deno-lint-ignore no-deprecated-deno-api const p = await Deno.run({ cmd: [Deno.execPath(), "eval", code], stdout: "piped", diff --git a/cli/tests/testdata/run/error_005_missing_dynamic_import.ts.out b/cli/tests/testdata/run/error_005_missing_dynamic_import.ts.out index 55e4a8524..530c17f91 100644 --- a/cli/tests/testdata/run/error_005_missing_dynamic_import.ts.out +++ b/cli/tests/testdata/run/error_005_missing_dynamic_import.ts.out @@ -1,4 +1,5 @@ error: Uncaught (in promise) TypeError: Module not found "[WILDCARD]/bad-module.ts". + at file:///[WILDCARD]/error_005_missing_dynamic_import.ts:2:35 const _badModule = await import("./bad-module.ts"); ^ at async file://[WILDCARD]/error_005_missing_dynamic_import.ts:2:22 diff --git a/cli/tests/testdata/run/error_015_dynamic_import_permissions.out b/cli/tests/testdata/run/error_015_dynamic_import_permissions.out index ef54f331b..209e241a7 100644 --- a/cli/tests/testdata/run/error_015_dynamic_import_permissions.out +++ b/cli/tests/testdata/run/error_015_dynamic_import_permissions.out @@ -1,4 +1,5 @@ error: Uncaught (in promise) TypeError: Requires net access to "localhost:4545", run again with the --allow-net flag + at file:///[WILDCARD]/error_015_dynamic_import_permissions.js:2:16 await import("http://localhost:4545/subdir/mod4.js"); ^ at async file://[WILDCARD]/error_015_dynamic_import_permissions.js:2:3 diff --git a/cli/tests/testdata/run/reference_types_error.js.out b/cli/tests/testdata/run/reference_types_error.js.out index ebb9b3a26..86055f3ac 100644 --- a/cli/tests/testdata/run/reference_types_error.js.out +++ b/cli/tests/testdata/run/reference_types_error.js.out @@ -1,2 +1,2 @@ error: Module not found "file:///[WILDCARD]/nonexistent.d.ts". - at file:///[WILDCARD]/reference_types_error.js:1:23 + at file:///[WILDCARD]/reference_types_error.js:1:22 diff --git a/cli/tests/testdata/test/captured_output.ts b/cli/tests/testdata/test/captured_output.ts index 43295f027..905156fd4 100644 --- a/cli/tests/testdata/test/captured_output.ts +++ b/cli/tests/testdata/test/captured_output.ts @@ -1,4 +1,5 @@ Deno.test("output", async () => { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [Deno.execPath(), "eval", "console.log(0); console.error(1);"], }); diff --git a/cli/tests/testdata/workers/permissions_dynamic_remote.ts.out b/cli/tests/testdata/workers/permissions_dynamic_remote.ts.out index cbddb61e0..2aeeb02e1 100644 --- a/cli/tests/testdata/workers/permissions_dynamic_remote.ts.out +++ b/cli/tests/testdata/workers/permissions_dynamic_remote.ts.out @@ -1,4 +1,5 @@ error: Uncaught (in worker "") (in promise) TypeError: Requires net access to "example.com", run again with the --allow-net flag + at http://localhost:4545/workers/dynamic_remote.ts:2:14 await import("https://example.com/some/file.ts"); ^ at async http://localhost:4545/workers/dynamic_remote.ts:2:1 diff --git a/cli/tests/unit/http_test.ts b/cli/tests/unit/http_test.ts index 331570a84..73ff35e09 100644 --- a/cli/tests/unit/http_test.ts +++ b/cli/tests/unit/http_test.ts @@ -2080,6 +2080,7 @@ 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); @@ -2142,6 +2143,7 @@ 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/cli/tests/unit/process_test.ts b/cli/tests/unit/process_test.ts index 3291956f9..f74ffc9bd 100644 --- a/cli/tests/unit/process_test.ts +++ b/cli/tests/unit/process_test.ts @@ -11,6 +11,7 @@ Deno.test( { permissions: { read: true, run: false } }, function runPermissions() { assertThrows(() => { + // deno-lint-ignore no-deprecated-deno-api Deno.run({ cmd: [Deno.execPath(), "eval", "console.log('hello world')"], }); @@ -21,6 +22,7 @@ Deno.test( Deno.test( { permissions: { run: true, read: true } }, async function runSuccess() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ // freeze the array to ensure it's not modified cmd: Object.freeze([ @@ -43,6 +45,7 @@ Deno.test( Deno.test( { permissions: { run: true, read: true } }, async function runUrl() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ new URL(`file:///${Deno.execPath()}`), @@ -66,6 +69,7 @@ Deno.test( async function runStdinRid0(): Promise< void > { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [Deno.execPath(), "eval", "console.log('hello world')"], stdin: 0, @@ -85,6 +89,7 @@ Deno.test( { permissions: { run: true, read: true } }, function runInvalidStdio() { assertThrows(() => + // deno-lint-ignore no-deprecated-deno-api Deno.run({ cmd: [Deno.execPath(), "eval", "console.log('hello world')"], // @ts-expect-error because Deno.run should throw on invalid stdin. @@ -92,6 +97,7 @@ Deno.test( }) ); assertThrows(() => + // deno-lint-ignore no-deprecated-deno-api Deno.run({ cmd: [Deno.execPath(), "eval", "console.log('hello world')"], // @ts-expect-error because Deno.run should throw on invalid stdout. @@ -99,6 +105,7 @@ Deno.test( }) ); assertThrows(() => + // deno-lint-ignore no-deprecated-deno-api Deno.run({ cmd: [Deno.execPath(), "eval", "console.log('hello world')"], // @ts-expect-error because Deno.run should throw on invalid stderr. @@ -111,6 +118,7 @@ Deno.test( Deno.test( { permissions: { run: true, read: true } }, async function runCommandFailedWithCode() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [Deno.execPath(), "eval", "Deno.exit(41 + 1)"], }); @@ -127,6 +135,7 @@ Deno.test( permissions: { run: true, read: true }, }, async function runCommandFailedWithSignal() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -150,6 +159,7 @@ Deno.test( Deno.test({ permissions: { run: true } }, function runNotFound() { let error; try { + // deno-lint-ignore no-deprecated-deno-api Deno.run({ cmd: ["this file hopefully doesn't exist"] }); } catch (e) { error = e; @@ -181,6 +191,7 @@ tryExit(); `; Deno.writeFileSync(`${cwd}/${programFile}`, enc.encode(program)); + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cwd, cmd: [Deno.execPath(), "run", "--allow-read", programFile], @@ -204,6 +215,7 @@ Deno.test( async function runStdinPiped(): Promise< void > { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -235,6 +247,7 @@ Deno.test( async function runStdoutPiped(): Promise< void > { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -271,6 +284,7 @@ Deno.test( async function runStderrPiped(): Promise< void > { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -305,6 +319,7 @@ Deno.test( Deno.test( { permissions: { run: true, read: true } }, async function runOutput() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -325,6 +340,7 @@ Deno.test( async function runStderrOutput(): Promise< void > { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -350,6 +366,7 @@ Deno.test( write: true, }); + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -382,6 +399,7 @@ Deno.test( await Deno.writeFile(fileName, encoder.encode("hello")); const file = await Deno.open(fileName); + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -401,6 +419,7 @@ Deno.test( Deno.test( { permissions: { run: true, read: true } }, async function runEnv() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -423,6 +442,7 @@ Deno.test( Deno.test( { permissions: { run: true, read: true } }, async function runClose() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -446,6 +466,7 @@ Deno.test( Deno.test( { permissions: { run: true, read: true } }, async function runKillAfterStatus() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [Deno.execPath(), "eval", 'console.log("hello")'], }); @@ -502,6 +523,7 @@ Deno.test( Deno.test( { permissions: { run: true, read: true } }, async function killSuccess() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [Deno.execPath(), "eval", "setTimeout(() => {}, 10000)"], }); @@ -525,6 +547,7 @@ Deno.test( ); Deno.test({ permissions: { run: true, read: true } }, function killFailed() { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [Deno.execPath(), "eval", "setTimeout(() => {}, 10000)"], }); @@ -542,6 +565,7 @@ Deno.test({ permissions: { run: true, read: true } }, function killFailed() { Deno.test( { permissions: { run: true, read: true, env: true } }, async function clearEnv(): Promise<void> { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), @@ -574,6 +598,7 @@ Deno.test( ignore: Deno.build.os === "windows", }, async function uid(): Promise<void> { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ "id", @@ -587,6 +612,7 @@ Deno.test( if (currentUid !== "0") { assertThrows(() => { + // deno-lint-ignore no-deprecated-deno-api Deno.run({ cmd: [ "echo", @@ -605,6 +631,7 @@ Deno.test( ignore: Deno.build.os === "windows", }, async function gid(): Promise<void> { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ "id", @@ -618,6 +645,7 @@ Deno.test( if (currentGid !== "0") { assertThrows(() => { + // deno-lint-ignore no-deprecated-deno-api Deno.run({ cmd: [ "echo", @@ -636,6 +664,7 @@ Deno.test( ignore: Deno.build.os === "windows", }, async function non_existent_cwd(): Promise<void> { + // deno-lint-ignore no-deprecated-deno-api const p = Deno.run({ cmd: [ Deno.execPath(), |