Fix off-by-one error in --rerun-each loop condition

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 <noreply@anthropic.com>
This commit is contained in:
Claude Bot
2025-07-29 08:52:49 +00:00
parent 886fad5021
commit ff37f71bcd

View File

@@ -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);