mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
test: remove usage of --unstable
flag (#25549)
This commit removes all occurrences of `--unstable` flag from all the tests that are run in CI. Turns out none of the tests actually required that flag anymore.
This commit is contained in:
parent
3f6afd1947
commit
9a169e3cf1
12 changed files with 11 additions and 36 deletions
|
@ -215,7 +215,6 @@ fn typecheck_declarations_unstable() {
|
||||||
let args = vec![
|
let args = vec![
|
||||||
"test".to_string(),
|
"test".to_string(),
|
||||||
"--doc".to_string(),
|
"--doc".to_string(),
|
||||||
"--unstable".to_string(),
|
|
||||||
util::root_path()
|
util::root_path()
|
||||||
.join("cli/tsc/dts/lib.deno.unstable.d.ts")
|
.join("cli/tsc/dts/lib.deno.unstable.d.ts")
|
||||||
.to_string_lossy()
|
.to_string_lossy()
|
||||||
|
|
|
@ -488,9 +488,8 @@ itest!(_088_dynamic_import_already_evaluating {
|
||||||
output: "run/088_dynamic_import_already_evaluating.ts.out",
|
output: "run/088_dynamic_import_already_evaluating.ts.out",
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
|
|
||||||
itest!(_089_run_allow_list {
|
itest!(_089_run_allow_list {
|
||||||
args: "run --unstable --allow-run=curl run/089_run_allow_list.ts",
|
args: "run --allow-run=curl run/089_run_allow_list.ts",
|
||||||
envs: vec![
|
envs: vec![
|
||||||
("LD_LIBRARY_PATH".to_string(), "".to_string()),
|
("LD_LIBRARY_PATH".to_string(), "".to_string()),
|
||||||
("DYLD_FALLBACK_LIBRARY_PATH".to_string(), "".to_string())
|
("DYLD_FALLBACK_LIBRARY_PATH".to_string(), "".to_string())
|
||||||
|
@ -2540,14 +2539,12 @@ mod permissions {
|
||||||
use test_util::itest;
|
use test_util::itest;
|
||||||
use util::TestContext;
|
use util::TestContext;
|
||||||
|
|
||||||
// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
|
|
||||||
#[test]
|
#[test]
|
||||||
fn with_allow() {
|
fn with_allow() {
|
||||||
for permission in &util::PERMISSION_VARIANTS {
|
for permission in &util::PERMISSION_VARIANTS {
|
||||||
let status = util::deno_cmd()
|
let status = util::deno_cmd()
|
||||||
.current_dir(util::testdata_path())
|
.current_dir(util::testdata_path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--unstable")
|
|
||||||
.arg(format!("--allow-{permission}"))
|
.arg(format!("--allow-{permission}"))
|
||||||
.arg("run/permission_test.ts")
|
.arg("run/permission_test.ts")
|
||||||
.arg(format!("{permission}Required"))
|
.arg(format!("{permission}Required"))
|
||||||
|
@ -2559,13 +2556,12 @@ mod permissions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
|
|
||||||
#[test]
|
#[test]
|
||||||
fn without_allow() {
|
fn without_allow() {
|
||||||
for permission in &util::PERMISSION_VARIANTS {
|
for permission in &util::PERMISSION_VARIANTS {
|
||||||
let (_, err) = util::run_and_collect_output(
|
let (_, err) = util::run_and_collect_output(
|
||||||
false,
|
false,
|
||||||
&format!("run --unstable run/permission_test.ts {permission}Required"),
|
&format!("run run/permission_test.ts {permission}Required"),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
false,
|
false,
|
||||||
|
@ -3019,7 +3015,7 @@ mod permissions {
|
||||||
fn _066_prompt() {
|
fn _066_prompt() {
|
||||||
TestContext::default()
|
TestContext::default()
|
||||||
.new_command()
|
.new_command()
|
||||||
.args_vec(["run", "--quiet", "--unstable", "run/066_prompt.ts"])
|
.args_vec(["run", "--quiet", "run/066_prompt.ts"])
|
||||||
.with_pty(|mut console| {
|
.with_pty(|mut console| {
|
||||||
console.expect("What is your name? Jane Doe");
|
console.expect("What is your name? Jane Doe");
|
||||||
console.write_line_raw("");
|
console.write_line_raw("");
|
||||||
|
@ -3575,7 +3571,6 @@ fn deno_no_prompt_environment_variable() {
|
||||||
let output = util::deno_cmd()
|
let output = util::deno_cmd()
|
||||||
.current_dir(util::testdata_path())
|
.current_dir(util::testdata_path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("run/no_prompt.ts")
|
.arg("run/no_prompt.ts")
|
||||||
.env("DENO_NO_PROMPT", "1")
|
.env("DENO_NO_PROMPT", "1")
|
||||||
.spawn()
|
.spawn()
|
||||||
|
@ -4089,7 +4084,6 @@ async fn http2_request_url() {
|
||||||
let mut child = util::deno_cmd()
|
let mut child = util::deno_cmd()
|
||||||
.current_dir(util::testdata_path())
|
.current_dir(util::testdata_path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("--quiet")
|
.arg("--quiet")
|
||||||
.arg("--allow-net")
|
.arg("--allow-net")
|
||||||
.arg("--allow-read")
|
.arg("--allow-read")
|
||||||
|
@ -4384,7 +4378,6 @@ async fn websocket_server_multi_field_connection_header() {
|
||||||
let root_ca = util::testdata_path().join("tls/RootCA.pem");
|
let root_ca = util::testdata_path().join("tls/RootCA.pem");
|
||||||
let mut child = util::deno_cmd()
|
let mut child = util::deno_cmd()
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("--allow-net")
|
.arg("--allow-net")
|
||||||
.arg("--cert")
|
.arg("--cert")
|
||||||
.arg(root_ca)
|
.arg(root_ca)
|
||||||
|
@ -4438,7 +4431,6 @@ async fn websocket_server_idletimeout() {
|
||||||
let root_ca = util::testdata_path().join("tls/RootCA.pem");
|
let root_ca = util::testdata_path().join("tls/RootCA.pem");
|
||||||
let mut child = util::deno_cmd()
|
let mut child = util::deno_cmd()
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("--allow-net")
|
.arg("--allow-net")
|
||||||
.arg("--cert")
|
.arg("--cert")
|
||||||
.arg(root_ca)
|
.arg(root_ca)
|
||||||
|
@ -5089,7 +5081,6 @@ async fn listen_tls_alpn() {
|
||||||
let mut child = util::deno_cmd()
|
let mut child = util::deno_cmd()
|
||||||
.current_dir(util::testdata_path())
|
.current_dir(util::testdata_path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("--quiet")
|
.arg("--quiet")
|
||||||
.arg("--allow-net")
|
.arg("--allow-net")
|
||||||
.arg("--allow-read")
|
.arg("--allow-read")
|
||||||
|
@ -5143,7 +5134,6 @@ async fn listen_tls_alpn_fail() {
|
||||||
let mut child = util::deno_cmd()
|
let mut child = util::deno_cmd()
|
||||||
.current_dir(util::testdata_path())
|
.current_dir(util::testdata_path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("--quiet")
|
.arg("--quiet")
|
||||||
.arg("--allow-net")
|
.arg("--allow-net")
|
||||||
.arg("--allow-read")
|
.arg("--allow-read")
|
||||||
|
|
|
@ -499,7 +499,6 @@ async fn run_watch_no_dynamic() {
|
||||||
.current_dir(t.path())
|
.current_dir(t.path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--watch")
|
.arg("--watch")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("-L")
|
.arg("-L")
|
||||||
.arg("debug")
|
.arg("debug")
|
||||||
.arg(&file_to_watch)
|
.arg(&file_to_watch)
|
||||||
|
@ -626,7 +625,6 @@ async fn run_watch_external_watch_files() {
|
||||||
.arg(watch_arg)
|
.arg(watch_arg)
|
||||||
.arg("-L")
|
.arg("-L")
|
||||||
.arg("debug")
|
.arg("debug")
|
||||||
.arg("--unstable")
|
|
||||||
.arg(&file_to_watch)
|
.arg(&file_to_watch)
|
||||||
.env("NO_COLOR", "1")
|
.env("NO_COLOR", "1")
|
||||||
.piped_output()
|
.piped_output()
|
||||||
|
@ -671,7 +669,6 @@ async fn run_watch_load_unload_events() {
|
||||||
.current_dir(t.path())
|
.current_dir(t.path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--watch")
|
.arg("--watch")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("-L")
|
.arg("-L")
|
||||||
.arg("debug")
|
.arg("debug")
|
||||||
.arg(&file_to_watch)
|
.arg(&file_to_watch)
|
||||||
|
@ -723,7 +720,6 @@ async fn run_watch_not_exit() {
|
||||||
.current_dir(t.path())
|
.current_dir(t.path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--watch")
|
.arg("--watch")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("-L")
|
.arg("-L")
|
||||||
.arg("debug")
|
.arg("debug")
|
||||||
.arg(&file_to_watch)
|
.arg(&file_to_watch)
|
||||||
|
@ -873,7 +869,6 @@ async fn test_watch_basic() {
|
||||||
.current_dir(t.path())
|
.current_dir(t.path())
|
||||||
.arg("test")
|
.arg("test")
|
||||||
.arg("--watch")
|
.arg("--watch")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("--no-check")
|
.arg("--no-check")
|
||||||
.arg(t.path())
|
.arg(t.path())
|
||||||
.env("NO_COLOR", "1")
|
.env("NO_COLOR", "1")
|
||||||
|
@ -1029,7 +1024,6 @@ async fn test_watch_doc() {
|
||||||
.arg("test")
|
.arg("test")
|
||||||
.arg("--watch")
|
.arg("--watch")
|
||||||
.arg("--doc")
|
.arg("--doc")
|
||||||
.arg("--unstable")
|
|
||||||
.arg(t.path())
|
.arg(t.path())
|
||||||
.env("NO_COLOR", "1")
|
.env("NO_COLOR", "1")
|
||||||
.piped_output()
|
.piped_output()
|
||||||
|
@ -1407,7 +1401,6 @@ async fn run_watch_dynamic_imports() {
|
||||||
.current_dir(t.path())
|
.current_dir(t.path())
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("--watch")
|
.arg("--watch")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("--allow-read")
|
.arg("--allow-read")
|
||||||
.arg("-L")
|
.arg("-L")
|
||||||
.arg("debug")
|
.arg("debug")
|
||||||
|
|
|
@ -14,7 +14,6 @@ fn node_compat_tests() {
|
||||||
.arg("--config")
|
.arg("--config")
|
||||||
.arg(deno_config_path())
|
.arg(deno_config_path())
|
||||||
.arg("--no-lock")
|
.arg("--no-lock")
|
||||||
.arg("--unstable")
|
|
||||||
.arg("-A")
|
.arg("-A")
|
||||||
.arg(util::tests_path().join("node_compat/test.ts"))
|
.arg(util::tests_path().join("node_compat/test.ts"))
|
||||||
.spawn()
|
.spawn()
|
||||||
|
|
|
@ -30,10 +30,10 @@ There are two ways to run `unit_test_runner.ts`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Run all tests.
|
# Run all tests.
|
||||||
cargo run --bin deno -- test --allow-all --unstable --location=http://js-unit-tests/foo/bar cli/tests/unit/
|
cargo run --bin deno -- test --allow-all --location=http://js-unit-tests/foo/bar cli/tests/unit/
|
||||||
|
|
||||||
# Run a specific test module
|
# Run a specific test module
|
||||||
cargo run --bin deno -- test --allow-all --unstable --location=http://js-unit-tests/foo/bar cli/tests/unit/files_test.ts
|
cargo run --bin deno -- test --allow-all --location=http://js-unit-tests/foo/bar cli/tests/unit/files_test.ts
|
||||||
```
|
```
|
||||||
|
|
||||||
### Http server
|
### Http server
|
||||||
|
|
|
@ -528,7 +528,7 @@ Deno.test(
|
||||||
},
|
},
|
||||||
async function commandFailedWithSignal() {
|
async function commandFailedWithSignal() {
|
||||||
const output = await new Deno.Command(Deno.execPath(), {
|
const output = await new Deno.Command(Deno.execPath(), {
|
||||||
args: ["eval", "--unstable", "Deno.kill(Deno.pid, 'SIGKILL')"],
|
args: ["eval", "Deno.kill(Deno.pid, 'SIGKILL')"],
|
||||||
}).output();
|
}).output();
|
||||||
assertEquals(output.success, false);
|
assertEquals(output.success, false);
|
||||||
if (Deno.build.os === "windows") {
|
if (Deno.build.os === "windows") {
|
||||||
|
@ -547,7 +547,7 @@ Deno.test(
|
||||||
},
|
},
|
||||||
function commandSyncFailedWithSignal() {
|
function commandSyncFailedWithSignal() {
|
||||||
const output = new Deno.Command(Deno.execPath(), {
|
const output = new Deno.Command(Deno.execPath(), {
|
||||||
args: ["eval", "--unstable", "Deno.kill(Deno.pid, 'SIGKILL')"],
|
args: ["eval", "Deno.kill(Deno.pid, 'SIGKILL')"],
|
||||||
}).outputSync();
|
}).outputSync();
|
||||||
assertEquals(output.success, false);
|
assertEquals(output.success, false);
|
||||||
if (Deno.build.os === "windows") {
|
if (Deno.build.os === "windows") {
|
||||||
|
@ -835,7 +835,7 @@ Deno.test(
|
||||||
const command = await new Deno.Command(Deno.execPath(), {
|
const command = await new Deno.Command(Deno.execPath(), {
|
||||||
cwd: Deno.args[0],
|
cwd: Deno.args[0],
|
||||||
stdout: "piped",
|
stdout: "piped",
|
||||||
args: ["run", "-A", "--unstable", Deno.args[1]],
|
args: ["run", "-A", Deno.args[1]],
|
||||||
});
|
});
|
||||||
const child = command.spawn();
|
const child = command.spawn();
|
||||||
const readable = child.stdout.pipeThrough(new TextDecoderStream());
|
const readable = child.stdout.pipeThrough(new TextDecoderStream());
|
||||||
|
@ -877,7 +877,7 @@ setInterval(() => {
|
||||||
Deno.execPath(),
|
Deno.execPath(),
|
||||||
{
|
{
|
||||||
cwd,
|
cwd,
|
||||||
args: ["run", "-A", "--unstable", programFile, cwd, childProgramFile],
|
args: ["run", "-A", programFile, cwd, childProgramFile],
|
||||||
},
|
},
|
||||||
).output();
|
).output();
|
||||||
|
|
||||||
|
|
|
@ -929,7 +929,7 @@ function runFlockTestProcess(opts: { exclusive: boolean; sync: boolean }) {
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const process = new Deno.Command(Deno.execPath(), {
|
const process = new Deno.Command(Deno.execPath(), {
|
||||||
args: ["eval", "--unstable", scriptText],
|
args: ["eval", scriptText],
|
||||||
stdin: "piped",
|
stdin: "piped",
|
||||||
stdout: "piped",
|
stdout: "piped",
|
||||||
stderr: "null",
|
stderr: "null",
|
||||||
|
|
|
@ -172,7 +172,7 @@ Deno.test(
|
||||||
async function osPpidIsEqualToPidOfParentProcess() {
|
async function osPpidIsEqualToPidOfParentProcess() {
|
||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
const { stdout } = await new Deno.Command(Deno.execPath(), {
|
const { stdout } = await new Deno.Command(Deno.execPath(), {
|
||||||
args: ["eval", "-p", "--unstable", "Deno.ppid"],
|
args: ["eval", "-p", "Deno.ppid"],
|
||||||
env: { NO_COLOR: "true" },
|
env: { NO_COLOR: "true" },
|
||||||
}).output();
|
}).output();
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,6 @@ Deno.test(
|
||||||
const { code } = await new Deno.Command(Deno.execPath(), {
|
const { code } = await new Deno.Command(Deno.execPath(), {
|
||||||
args: [
|
args: [
|
||||||
"eval",
|
"eval",
|
||||||
"--unstable",
|
|
||||||
"Deno.addSignalListener('SIGINT', () => {})",
|
"Deno.addSignalListener('SIGINT', () => {})",
|
||||||
],
|
],
|
||||||
}).output();
|
}).output();
|
||||||
|
|
|
@ -21,7 +21,6 @@ export async function assertCallbackErrorUncaught(
|
||||||
const p = new Deno.Command(Deno.execPath(), {
|
const p = new Deno.Command(Deno.execPath(), {
|
||||||
args: [
|
args: [
|
||||||
"eval",
|
"eval",
|
||||||
"--unstable",
|
|
||||||
`${prelude ?? ""}
|
`${prelude ?? ""}
|
||||||
|
|
||||||
${invocation}(err) => {
|
${invocation}(err) => {
|
||||||
|
|
|
@ -528,7 +528,6 @@ Deno.test({
|
||||||
const childProcess = spawn(Deno.execPath(), [
|
const childProcess = spawn(Deno.execPath(), [
|
||||||
"run",
|
"run",
|
||||||
"-A",
|
"-A",
|
||||||
"--unstable",
|
|
||||||
script,
|
script,
|
||||||
]);
|
]);
|
||||||
const deferred = Promise.withResolvers<void>();
|
const deferred = Promise.withResolvers<void>();
|
||||||
|
|
|
@ -173,7 +173,6 @@ Deno.test({
|
||||||
args: [
|
args: [
|
||||||
"run",
|
"run",
|
||||||
"--quiet",
|
"--quiet",
|
||||||
"--unstable",
|
|
||||||
"./testdata/process_exit.ts",
|
"./testdata/process_exit.ts",
|
||||||
],
|
],
|
||||||
cwd,
|
cwd,
|
||||||
|
@ -895,7 +894,6 @@ Deno.test({
|
||||||
args: [
|
args: [
|
||||||
"run",
|
"run",
|
||||||
"--quiet",
|
"--quiet",
|
||||||
"--unstable",
|
|
||||||
"./testdata/process_exit2.ts",
|
"./testdata/process_exit2.ts",
|
||||||
],
|
],
|
||||||
cwd: testDir,
|
cwd: testDir,
|
||||||
|
@ -914,7 +912,6 @@ Deno.test({
|
||||||
args: [
|
args: [
|
||||||
"run",
|
"run",
|
||||||
"--quiet",
|
"--quiet",
|
||||||
"--unstable",
|
|
||||||
"./testdata/process_really_exit.ts",
|
"./testdata/process_really_exit.ts",
|
||||||
],
|
],
|
||||||
cwd: testDir,
|
cwd: testDir,
|
||||||
|
|
Loading…
Reference in a new issue