Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_longest gets reset if aggregate_tests called multiple times #113

Open
FractalBoy opened this issue Nov 30, 2022 · 0 comments
Open

_longest gets reset if aggregate_tests called multiple times #113

FractalBoy opened this issue Nov 30, 2022 · 0 comments
Assignees

Comments

@FractalBoy
Copy link

Every time aggregate_tests is called, it calls prepare, which sets $longest to 0, finds the longest test description, and then sets the _longest attribute.

If aggregate_tests is called multiple times with the same formatter, then _longest can end up being less than the actual longest description, causing a negative repeat count warning.

The fix to this would be to start with the current value of _prepare instead of starting at 0 every time.

@Leont Leont self-assigned this Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants