Repository navigation
feat(cli): add --repeats CLI option - #10504
Conversation
|
Hello @todor-a. Your PR has been labeled To keep your PR open, please follow these steps:
Please, do not generate or format the response with AI. If you do not speak English, reply in your native language or use translation software like Google Translate or Deepl. If the response is generated, the PR will be closed automatically. These measures help us reduce maintenance burden and keep the team's work efficient. See our AI contributions policy for more context. |
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Hey. Yes, I am a real human. I've disclosed that the use of AI in the description (Claude Code). I would love for this cli flag to be available and I saw that the other PR is stale so I decided to create a new one. |
Exposes the test `repeats` option as a CLI argument and config option, mirroring `retry`. The config value is applied during collection so `testCase.options.repeats` reflects it, and a per-test `repeats` option takes precedence.
Description
Exposes the test
repeatsoption as a CLI argument (--repeats <number>) and config option, mirroringretry. Resolves #7352.Builds on the stale #9250 and addresses its review feedback:
packages/runner/src/suite.ts:options.repeats ?? runner.config.repeats) sotestCase.options.repeatsreflects the config value instead of being forced to0. A per-testrepeatsoption still takes precedence. (run.tsis left unchanged, per the maintainer's note.)repeatsto the project-config override allowlist inresolveProjects.ts, which feat(cli): add --repeats to the cli options #9250 missed — without it--repeatsdid not reach workspace/project configs (covered by a new test).Tests
test/e2e/test/repeats.test.ts— configrepeatspropagates totestCase.options.repeatsand the test actually repeats; per-test option overrides config.test/e2e/test/cli-config.test.ts—--repeatsinherited from the CLI into the resolved (project) config.This PR was prepared with AI assistance.