You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a `flaky` option that re-runs a failing test until it passes,
intended for tests with unavoidable nondeterminism. Setting
`flaky: true` retries up to 20 times; `flaky: <positive integer>`
sets an explicit retry budget. The option is accepted on tests and
suites and via the it.flaky/test.flaky/describe.flaky/suite.flaky
shorthands; a test-case value overrides an inherited suite value
(nearest wins), and `flaky: false` opts a test out.
Only the final attempt is observable: intermediate failures emit no
test:fail, no per-test diagnostics, and nothing on the node.test
error channel. Each result carries a new `retryCount` field on the
test:pass, test:fail, and test:complete events (the number of retries
performed, `undefined` for non-flaky tests), reporters print a
`# FLAKY` directive, and the run summary gains a `flaky` counter.
beforeEach/afterEach re-run on every attempt while before/after run
once, so per-attempt state is reset and retries do not leak state.
An externally aborted test and an expectFailure are not retried. A
flaky test whose timeout is exhausted is reported as a failure rather
than cancelled.
Co-authored-by: vespa7 <98526766+vespa7@users.noreply.github.com>
Signed-off-by: sangwook <rewq5991@gmail.com>
0 commit comments