···11+---
22+title: repeats | Config
33+outline: deep
44+---
55+66+# repeats
77+88+- **Type:** `number`
99+- **Default:** `0`
1010+- **CLI:** `--repeats=<number>`
1111+1212+Repeat every test a specific number of times regardless of the result. A test that uses the [`repeats`](/api/test#repeats) test option takes precedence over this value.
1313+1414+This is useful for verifying that tests are stable across multiple runs. If a test fails on any repetition, the whole test is reported as failed.
+7
docs/guide/cli-generated.md
···637637638638Regex pattern to match error messages that should trigger a retry. Only errors matching this pattern will cause a retry (default: retry on all errors)
639639640640+### repeats
641641+642642+- **CLI:** `--repeats <number>`
643643+- **Config:** [repeats](/config/repeats)
644644+645645+Repeat every test a specific number of times regardless of the result (default: `0`)
646646+640647### diff.aAnnotation
641648642649- **CLI:** `--diff.aAnnotation <annotation>`
···630630 },
631631 },
632632 },
633633+ repeats: {
634634+ description:
635635+ 'Repeat every test a specific number of times regardless of the result (default: `0`)',
636636+ argument: '<number>',
637637+ },
633638 diff: {
634639 description:
635640 'DiffOptions object or a path to a module which exports DiffOptions object',
···831831 retry?: SerializableRetry
832832833833 /**
834834+ * Repeat every test a specific number of times regardless of the result.
835835+ *
836836+ * @default 0 // Don't repeat
837837+ */
838838+ repeats?: number
839839+840840+ /**
834841 * Show full diff when snapshot fails instead of a patch.
835842 */
836843 expandSnapshotDiff?: boolean