Claude Opus 5.5

vitest-5-0-0-18-b

Claude Code's read-only tools, web search on, ludion sync on

Question

What does vitest --repeats do?

Answer key

A correct answer says
The `--repeats` CLI option reruns tests a given number of times.
The stale answer
Repeats can only be set per test via the `repeats` test option.

The change's lesson

Answer

`vitest --repeats <n>` runs every test n extra times, and it does this whether the test passes or fails. That makes it useful for finding flaky tests, which only fail some of the time. It works differently from `--retry`. `--retry` only re-runs a test after it fails, so one passing run is enough to count it as a pass. With `--repeats`, every run has to succeed.

Where this comes from: the project's `.ludion/lessons.md` says the CLI flag was added in vitest 5.0.0, and you have 5.0.3 installed. The idea isn't new, though: older versions already had a per-test `repeats` option, as in `test('name', { repeats: 5 }, fn)`. I haven't run the flag in this project, so `npx vitest --help` will confirm it's there and show the exact syntax.

Answering cost $0.07.

Grade

correct

The judge's reason: It says the `--repeats` CLI flag reruns every test a set number of times, and it mentions the per-test `repeats` option only as earlier history, not as the sole current mechanism.

The judge's log

Session log

What the agent wrote, the tools it called, and what they returned, from docs/bench/2026-10-11-done3/runs/B-project-sync/vitest-5-0-0-18-b.jsonl. Thinking and the session's settings are left out. The raw log

  1. Agent

    `vitest --repeats <n>` runs every test n extra times, and it does this whether the test passes or fails. That makes it useful for finding flaky tests, which only fail some of the time. It works differently from `--retry`. `--retry` only re-runs a test after it fails, so one passing run is enough to count it as a pass. With `--repeats`, every run has to succeed.
    
    Where this comes from: the project's `.ludion/lessons.md` says the CLI flag was added in vitest 5.0.0, and you have 5.0.3 installed. The idea isn't new, though: older versions already had a per-test `repeats` option, as in `test('name', { repeats: 5 }, fn)`. I haven't run the flag in this project, so `npx vitest --help` will confirm it's there and show the exact syntax.