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![
|
||||
"test".to_string(),
|
||||
"--doc".to_string(),
|
||||
"--unstable".to_string(),
|
||||
util::root_path()
|
||||
.join("cli/tsc/dts/lib.deno.unstable.d.ts")
|
||||
.to_string_lossy()
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -209,7 +209,6 @@ Deno.test(
|
|||
const { code } = await new Deno.Command(Deno.execPath(), {
|
||||
args: [
|
||||
"eval",
|
||||
"--unstable",
|
||||
"Deno.addSignalListener('SIGINT', () => {})",
|
||||
],
|
||||
}).output();
|
||||
|
|
|
@ -21,7 +21,6 @@ export async function assertCallbackErrorUncaught(
|
|||
const p = new Deno.Command(Deno.execPath(), {
|
||||
args: [
|
||||
"eval",
|
||||
"--unstable",
|
||||
`${prelude ?? ""}
|
||||
|
||||
${invocation}(err) => {
|
||||
|
|
|
@ -528,7 +528,6 @@ Deno.test({
|
|||
const childProcess = spawn(Deno.execPath(), [
|
||||
"run",
|
||||
"-A",
|
||||
"--unstable",
|
||||
script,
|
||||
]);
|
||||
const deferred = Promise.withResolvers<void>();
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue