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
retryCondition: string | ((error: Error) => boolean): If string (Regexp), it should only retry when the occurred Error message matches the Regexp. If function, it should only retry when the function returns true.
Clear and concise description of the problem
Vitest supports a
retrymechanism, but currently it only retries a fixed number of times on any kind of error.This limits flexibility in several ways:
TimeoutError).Other test runners (e.g. Jest, WebdriverIO) provide these options:
specFileRetriesDelay+specFileRetriesDeferredoption.retryTimes(numRetries, { waitBeforeRetry: 100, retryImmediately: false })function.Suggested solution
Extend the
retryAPI with the following features:retryStrategy: "immediate" | "test-file" | "deferred"(defaultimmediate)immediate: retry failed test immediately.test-file: run retries until the end of the test file.deferred: defer retries after all other tests have run across all test files.retryDelay: number(milliseconds, default0). Or even better, use Add Support for Backoff Mechanism in Retry Configuration #8095retryCondition: string | ((error: Error) => boolean): Ifstring(Regexp), it should only retry when the occurredErrormessage matches the Regexp. If function, it should only retry when the function returnstrue.Alternative
No response
Additional context
No response
Validations