mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user