summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-09-10 12:28:59 +0100
committerGitHub <noreply@github.com>2024-09-10 11:28:59 +0000
commit9a169e3cf11cccec0dd1a6acbfdba927d99658f5 (patch)
tree165fa6f8727891df7c4c826177d7ea24fd121e55
parent3f6afd19472c7a13f21b1083d80a563d9359a7ab (diff)
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.
-rw-r--r--tests/integration/check_tests.rs1
-rw-r--r--tests/integration/run_tests.rs16
-rw-r--r--tests/integration/watcher_tests.rs7
-rw-r--r--tests/node_compat/test_runner.rs1
-rw-r--r--tests/unit/README.md4
-rw-r--r--tests/unit/command_test.ts8
-rw-r--r--tests/unit/files_test.ts2
-rw-r--r--tests/unit/os_test.ts2
-rw-r--r--tests/unit/signal_test.ts1
-rw-r--r--tests/unit_node/_test_utils.ts1
-rw-r--r--tests/unit_node/child_process_test.ts1
-rw-r--r--tests/unit_node/process_test.ts3
12 files changed, 11 insertions, 36 deletions
diff --git a/tests/integration/check_tests.rs b/tests/integration/check_tests.rs
index 8bb0ddde2..f5af5803c 100644
--- a/tests/integration/check_tests.rs
+++ b/tests/integration/check_tests.rs
@@ -215,7 +215,6 @@ fn typecheck_declarations_unstable() {
let args = vec![
"test".to_string(),
"--doc".to_string(),
- "--unstable".to_string(),
util::root_path()
.join("cli/tsc/dts/lib.deno.unstable.d.ts")
.to_string_lossy()
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index a75ca4c15..e18428575 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -488,9 +488,8 @@ itest!(_088_dynamic_import_already_evaluating {
output: "run/088_dynamic_import_already_evaluating.ts.out",
});
-// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
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![
("LD_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 util::TestContext;
- // TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
#[test]
fn with_allow() {
for permission in &util::PERMISSION_VARIANTS {
let status = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
- .arg("--unstable")
.arg(format!("--allow-{permission}"))
.arg("run/permission_test.ts")
.arg(format!("{permission}Required"))
@@ -2559,13 +2556,12 @@ mod permissions {
}
}
- // TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
#[test]
fn without_allow() {
for permission in &util::PERMISSION_VARIANTS {
let (_, err) = util::run_and_collect_output(
false,
- &format!("run --unstable run/permission_test.ts {permission}Required"),
+ &format!("run run/permission_test.ts {permission}Required"),
None,
None,
false,
@@ -3019,7 +3015,7 @@ mod permissions {
fn _066_prompt() {
TestContext::default()
.new_command()
- .args_vec(["run", "--quiet", "--unstable", "run/066_prompt.ts"])
+ .args_vec(["run", "--quiet", "run/066_prompt.ts"])
.with_pty(|mut console| {
console.expect("What is your name? Jane Doe");
console.write_line_raw("");
@@ -3575,7 +3571,6 @@ fn deno_no_prompt_environment_variable() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
- .arg("--unstable")
.arg("run/no_prompt.ts")
.env("DENO_NO_PROMPT", "1")
.spawn()
@@ -4089,7 +4084,6 @@ async fn http2_request_url() {
let mut child = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
- .arg("--unstable")
.arg("--quiet")
.arg("--allow-net")
.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 mut child = util::deno_cmd()
.arg("run")
- .arg("--unstable")
.arg("--allow-net")
.arg("--cert")
.arg(root_ca)
@@ -4438,7 +4431,6 @@ async fn websocket_server_idletimeout() {
let root_ca = util::testdata_path().join("tls/RootCA.pem");
let mut child = util::deno_cmd()
.arg("run")
- .arg("--unstable")
.arg("--allow-net")
.arg("--cert")
.arg(root_ca)
@@ -5089,7 +5081,6 @@ async fn listen_tls_alpn() {
let mut child = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
- .arg("--unstable")
.arg("--quiet")
.arg("--allow-net")
.arg("--allow-read")
@@ -5143,7 +5134,6 @@ async fn listen_tls_alpn_fail() {
let mut child = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
- .arg("--unstable")
.arg("--quiet")
.arg("--allow-net")
.arg("--allow-read")
diff --git a/tests/integration/watcher_tests.rs b/tests/integration/watcher_tests.rs
index 91ac5611f..2590e79d6 100644
--- a/tests/integration/watcher_tests.rs
+++ b/tests/integration/watcher_tests.rs
@@ -499,7 +499,6 @@ async fn run_watch_no_dynamic() {
.current_dir(t.path())
.arg("run")
.arg("--watch")
- .arg("--unstable")
.arg("-L")
.arg("debug")
.arg(&file_to_watch)
@@ -626,7 +625,6 @@ async fn run_watch_external_watch_files() {
.arg(watch_arg)
.arg("-L")
.arg("debug")
- .arg("--unstable")
.arg(&file_to_watch)
.env("NO_COLOR", "1")
.piped_output()
@@ -671,7 +669,6 @@ async fn run_watch_load_unload_events() {
.current_dir(t.path())
.arg("run")
.arg("--watch")
- .arg("--unstable")
.arg("-L")
.arg("debug")
.arg(&file_to_watch)
@@ -723,7 +720,6 @@ async fn run_watch_not_exit() {
.current_dir(t.path())
.arg("run")
.arg("--watch")
- .arg("--unstable")
.arg("-L")
.arg("debug")
.arg(&file_to_watch)
@@ -873,7 +869,6 @@ async fn test_watch_basic() {
.current_dir(t.path())
.arg("test")
.arg("--watch")
- .arg("--unstable")
.arg("--no-check")
.arg(t.path())
.env("NO_COLOR", "1")
@@ -1029,7 +1024,6 @@ async fn test_watch_doc() {
.arg("test")
.arg("--watch")
.arg("--doc")
- .arg("--unstable")
.arg(t.path())
.env("NO_COLOR", "1")
.piped_output()
@@ -1407,7 +1401,6 @@ async fn run_watch_dynamic_imports() {
.current_dir(t.path())
.arg("run")
.arg("--watch")
- .arg("--unstable")
.arg("--allow-read")
.arg("-L")
.arg("debug")
diff --git a/tests/node_compat/test_runner.rs b/tests/node_compat/test_runner.rs
index 759dd5d3e..15749ca7f 100644
--- a/tests/node_compat/test_runner.rs
+++ b/tests/node_compat/test_runner.rs
@@ -14,7 +14,6 @@ fn node_compat_tests() {
.arg("--config")
.arg(deno_config_path())
.arg("--no-lock")
- .arg("--unstable")
.arg("-A")
.arg(util::tests_path().join("node_compat/test.ts"))
.spawn()
diff --git a/tests/unit/README.md b/tests/unit/README.md
index af31c08fc..549a9d3ca 100644
--- a/tests/unit/README.md
+++ b/tests/unit/README.md
@@ -30,10 +30,10 @@ There are two ways to run `unit_test_runner.ts`:
```sh
# 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
-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
diff --git a/tests/unit/command_test.ts b/tests/unit/command_test.ts
index 6352e1fc7..c11761fe7 100644
--- a/tests/unit/command_test.ts
+++ b/tests/unit/command_test.ts
@@ -528,7 +528,7 @@ Deno.test(
},
async function commandFailedWithSignal() {
const output = await new Deno.Command(Deno.execPath(), {
- args: ["eval", "--unstable", "Deno.kill(Deno.pid, 'SIGKILL')"],
+ args: ["eval", "Deno.kill(Deno.pid, 'SIGKILL')"],
}).output();
assertEquals(output.success, false);
if (Deno.build.os === "windows") {
@@ -547,7 +547,7 @@ Deno.test(
},
function commandSyncFailedWithSignal() {
const output = new Deno.Command(Deno.execPath(), {
- args: ["eval", "--unstable", "Deno.kill(Deno.pid, 'SIGKILL')"],
+ args: ["eval", "Deno.kill(Deno.pid, 'SIGKILL')"],
}).outputSync();
assertEquals(output.success, false);
if (Deno.build.os === "windows") {
@@ -835,7 +835,7 @@ Deno.test(
const command = await new Deno.Command(Deno.execPath(), {
cwd: Deno.args[0],
stdout: "piped",
- args: ["run", "-A", "--unstable", Deno.args[1]],
+ args: ["run", "-A", Deno.args[1]],
});
const child = command.spawn();
const readable = child.stdout.pipeThrough(new TextDecoderStream());
@@ -877,7 +877,7 @@ setInterval(() => {
Deno.execPath(),
{
cwd,
- args: ["run", "-A", "--unstable", programFile, cwd, childProgramFile],
+ args: ["run", "-A", programFile, cwd, childProgramFile],
},
).output();
diff --git a/tests/unit/files_test.ts b/tests/unit/files_test.ts
index b39b5f417..c79397109 100644
--- a/tests/unit/files_test.ts
+++ b/tests/unit/files_test.ts
@@ -929,7 +929,7 @@ function runFlockTestProcess(opts: { exclusive: boolean; sync: boolean }) {
`;
const process = new Deno.Command(Deno.execPath(), {
- args: ["eval", "--unstable", scriptText],
+ args: ["eval", scriptText],
stdin: "piped",
stdout: "piped",
stderr: "null",
diff --git a/tests/unit/os_test.ts b/tests/unit/os_test.ts
index 9503f75d1..52aa2ce77 100644
--- a/tests/unit/os_test.ts
+++ b/tests/unit/os_test.ts
@@ -172,7 +172,7 @@ Deno.test(
async function osPpidIsEqualToPidOfParentProcess() {
const decoder = new TextDecoder();
const { stdout } = await new Deno.Command(Deno.execPath(), {
- args: ["eval", "-p", "--unstable", "Deno.ppid"],
+ args: ["eval", "-p", "Deno.ppid"],
env: { NO_COLOR: "true" },
}).output();
diff --git a/tests/unit/signal_test.ts b/tests/unit/signal_test.ts
index 0c0676428..65b5ba78e 100644
--- a/tests/unit/signal_test.ts
+++ b/tests/unit/signal_test.ts
@@ -209,7 +209,6 @@ Deno.test(
const { code } = await new Deno.Command(Deno.execPath(), {
args: [
"eval",
- "--unstable",
"Deno.addSignalListener('SIGINT', () => {})",
],
}).output();
diff --git a/tests/unit_node/_test_utils.ts b/tests/unit_node/_test_utils.ts
index d9dd4e5d5..c451ccd84 100644
--- a/tests/unit_node/_test_utils.ts
+++ b/tests/unit_node/_test_utils.ts
@@ -21,7 +21,6 @@ export async function assertCallbackErrorUncaught(
const p = new Deno.Command(Deno.execPath(), {
args: [
"eval",
- "--unstable",
`${prelude ?? ""}
${invocation}(err) => {
diff --git a/tests/unit_node/child_process_test.ts b/tests/unit_node/child_process_test.ts
index d613d2989..7e6977740 100644
--- a/tests/unit_node/child_process_test.ts
+++ b/tests/unit_node/child_process_test.ts
@@ -528,7 +528,6 @@ Deno.test({
const childProcess = spawn(Deno.execPath(), [
"run",
"-A",
- "--unstable",
script,
]);
const deferred = Promise.withResolvers<void>();
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts
index 579b51116..944686a87 100644
--- a/tests/unit_node/process_test.ts
+++ b/tests/unit_node/process_test.ts
@@ -173,7 +173,6 @@ Deno.test({
args: [
"run",
"--quiet",
- "--unstable",
"./testdata/process_exit.ts",
],
cwd,
@@ -895,7 +894,6 @@ Deno.test({
args: [
"run",
"--quiet",
- "--unstable",
"./testdata/process_exit2.ts",
],
cwd: testDir,
@@ -914,7 +912,6 @@ Deno.test({
args: [
"run",
"--quiet",
- "--unstable",
"./testdata/process_really_exit.ts",
],
cwd: testDir,