From 68cfccd19bc6d167bfa92a717a7913fa873062e8 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Wed, 2 Oct 2024 17:31:18 -0700 Subject: [PATCH] use bun.Output.Scoped.isVisible() to cache env check --- src/cli/test_command.zig | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/cli/test_command.zig b/src/cli/test_command.zig index 7ca4cfcab3..19d6097f44 100644 --- a/src/cli/test_command.zig +++ b/src/cli/test_command.zig @@ -175,15 +175,7 @@ pub const CommandLineReporter = struct { var this: *CommandLineReporter = @fieldParentPtr("callback", cb); - const debug_jest = blk: { - if (bun.getenvZ("BUN_DEBUG_jest")) |env| { - if (strings.eqlComptime(env, "1")) { - break :blk true; - } - } - break :blk false; - }; - if (bun.Environment.isRelease or !debug_jest) { + if (bun.Environment.isRelease or !Output.Scoped(.jest, false).isVisible()) { writeTestStatusLine(.pass, &writer); printTestLine(label, elapsed_ns, parent, false, writer); }