summaryrefslogtreecommitdiff
path: root/cli/args/flags.rs
diff options
context:
space:
mode:
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
+ )
}
}