Skip to content

Conversation

@MazenSamehR
Copy link

Description

Follow-up to #8812. Align retry types with serialization boundaries, pass TestError directly to retry condition, use SerializableRetry for reporter/runtime-facing data, and sanitize function conditions before reporters. Keeps function conditions usable in test files (workers) while ensuring reporter/config data stays serializable.

Resolves #8482

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

matanshavit and others added 6 commits December 31, 2025 23:17
…nhanced test retry control

This adds three new retry options:
- retryDelay: milliseconds to wait between retry attempts
- retryCondition: string pattern or function to conditionally retry based on error
- retryStrategy: 'immediate' (default), 'test-file', or 'deferred' retry timing
…bject

Refactor retry-related options (retry, retryDelay, retryCondition, retryStrategy)
into a single retry configuration object. This provides a cleaner API where retry
can be either a number (for simple retry count) or an object with count, delay,
condition, and strategy properties.

This change improves type safety and makes the retry configuration more intuitive
while maintaining backward compatibility with numeric retry values.
Group deferred tests by file and setup/cleanup file context before
running retries. This ensures snapshot state is correctly initialized.
Also update file result state after deferred retries complete.
@netlify
Copy link

netlify bot commented Jan 1, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 520f73d
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/695671d978302f0008c59bfb
😎 Deploy Preview https://deploy-preview-9370--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Enhanced retry options

3 participants