Skip to content

Commit

Permalink
add --permit-no-files testing
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroParker committed Nov 25, 2024
1 parent 132a7ca commit b0e779d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions cli/args/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10882,6 +10882,32 @@ mod tests {
);
}

#[test]
fn bench_no_files() {
let r = flags_from_vec(svec!["deno", "bench", "--permit-no-files"]);
assert_eq!(
r.unwrap(),
Flags {
subcommand: DenoSubcommand::Bench(BenchFlags {
filter: None,
json: false,
no_run: false,
files: FileFlags {
include: vec![],
ignore: vec![],
},
watch: None,
permit_no_files: true
}),
permissions: PermissionFlags {
no_prompt: true,
..Default::default()
},
type_check_mode: TypeCheckMode::Local,
..Flags::default()
}
);
}
#[test]
fn run_with_check() {
let r = flags_from_vec(svec!["deno", "run", "--check", "script.ts",]);
Expand Down

0 comments on commit b0e779d

Please sign in to comment.