From 89424f8e4a339d42f17e772f5f65fc89e024a8ca Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Fri, 24 Nov 2023 19:46:16 -0800 Subject: perf: move "cli/js/40_testing.js" out of main snapshot (#21212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/denoland/deno/issues/21136 --------- Co-authored-by: Bartek IwaƄczuk --- cli/args/flags.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'cli/args') 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 + ) } } -- cgit v1.2.3