summaryrefslogtreecommitdiff
path: root/cli/args/flags.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-11-24 19:46:16 -0800
committerGitHub <noreply@github.com>2023-11-25 04:46:16 +0100
commit89424f8e4a339d42f17e772f5f65fc89e024a8ca (patch)
treeffe7c8ac457810bb53d63fac4082bff21eb0d6f1 /cli/args/flags.rs
parent7d8f0ae038d44dd3fe25b3fa98157126f01b179b (diff)
perf: move "cli/js/40_testing.js" out of main snapshot (#21212)
Closes https://github.com/denoland/deno/issues/21136 --------- Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r--cli/args/flags.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs
index 53a034ef9..d1f6c153d 100644
--- a/cli/args/flags.rs
+++ b/cli/args/flags.rs
@@ -320,8 +320,16 @@ impl DenoSubcommand {
matches!(self, Self::Run(_))
}
- pub fn is_test_or_jupyter(&self) -> bool {
- matches!(self, Self::Test(_) | Self::Jupyter(_))
+ // Returns `true` if the subcommand depends on testing infrastructure.
+ pub fn needs_test(&self) -> bool {
+ matches!(
+ self,
+ Self::Test(_)
+ | Self::Jupyter(_)
+ | Self::Repl(_)
+ | Self::Bench(_)
+ | Self::Lsp
+ )
}
}