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

Add rule prefer-repeats #357

Open
ST-DDT opened this issue Jan 18, 2024 · 1 comment
Open

Add rule prefer-repeats #357

ST-DDT opened this issue Jan 18, 2024 · 1 comment

Comments

@ST-DDT
Copy link

ST-DDT commented Jan 18, 2024

Sometimes you want to run a test multiple times. For that reason vitest-dev/vitest#2652 added the repeats option. This option should be preferable over for each number.

This rule is related to prefer-each, but should be used specifically, if the for loop encapsulates the entire method, runs on integers and the counter isn't used anywhere in the method.

@veritem
Copy link
Owner

veritem commented Jan 18, 2024

a pr is welcome

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