Skip to content

Add seeded test order randomization#3448

Closed
JustABiologist wants to merge 1 commit into
avajs:mainfrom
JustABiologist:bounty/randomize-test-order-595
Closed

Add seeded test order randomization#3448
JustABiologist wants to merge 1 commit into
avajs:mainfrom
JustABiologist:bounty/randomize-test-order-595

Conversation

@JustABiologist

Copy link
Copy Markdown

Fixes #595.

IssueHunt bounty: https://oss.issuehunt.io/r/avajs/ava/issues/595

Summary

  • Add --randomize and --seed so AVA can shuffle selected test files and non-serial tests within each file.
  • Keep test.serial() declarations in source order while randomizing ordinary tests.
  • Report the seed in the default and TAP reporters so a randomized order can be reproduced.

Test plan

  • npx tap test-tap/runner.js
  • npx tap test-tap/integration/assorted.js
  • npx xo (passes with existing TODO warnings)
  • npx tsc --noEmit
  • git diff --check

@sindresorhus

Copy link
Copy Markdown
Member

We don't accept fully AI-generated PRs.

@avajs avajs locked as spam and limited conversation to collaborators May 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Randomize test runs

2 participants