From ff37f71bcd44394bace23ba8827f6d348355e513 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Tue, 29 Jul 2025 08:52:49 +0000 Subject: [PATCH] Fix off-by-one error in --rerun-each loop condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous fix changed the loop condition from < to <=, which caused an off-by-one error where --rerun-each N would run N+1 tests instead of N. This change reverts the loop condition back to < repeat_count, which is the correct behavior since repeat_index starts at 0. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/cli/test_command.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/test_command.zig b/src/cli/test_command.zig index 840b5e8b28..d283d66665 100644 --- a/src/cli/test_command.zig +++ b/src/cli/test_command.zig @@ -1829,7 +1829,7 @@ pub const TestCommand = struct { // Count each file only once, regardless of repeat count reporter.summary().files += 1; - while (repeat_index <= repeat_count) : (repeat_index += 1) { + while (repeat_index < repeat_count) : (repeat_index += 1) { reporter.jest.current_file.set(file_title, file_prefix, repeat_count, repeat_index); var promise = try vm.loadEntryPointForTestRunner(file_path);