Closed egonelbre closed 5 years ago
Thank you for submitting a PR. 🎉
I think you're right, more often users would want n number of slowest tests regardless of pkg, so let's give this a try.
I think in the future it'd be nice to consolidate the logic, e.g.,
var all []*test
then check if slow is available and do some logic relating to that, otherwise iterate over all
and add "line break" whenever pkg changes.
For consolidating logic, I was trying to avoid too large refactoring since you have the path towards v1 issue.
Awesome. Thanks for contribution.
This allows
-slow 5
to limit output to only 5 slowest tests, or-slow -1
to all slowest tests.Fixes #34