Randomize test execution order to detect hidden dependencies and flaky tests
- Wrap Jest, Mocha, or Vitest test runners with randomized execution order
- Seeded randomization for reproducible test runs using --seed flag
- Detect tests that fail only in specific execution orders
- Multiple shuffle strategies: full random, per-suite, per-file
- Report suspected test dependencies when failures occur only in certain orders
- CI-friendly exit codes (0 for pass, 1 for fail)
- JSON output mode for programmatic consumption
- Save and replay specific shuffle orders that exposed failures
- Colored terminal output showing test order and results
- Support for test filtering and pattern matching
Use this project when you need to:
- Quickly solve problems related to test-shuffle
- Integrate typescript functionality into your workflow
- Learn how typescript handles common patterns
# Clone the repository
git clone https://github.com/KurtWeston/test-shuffle.git
cd test-shuffle
# Install dependencies
npm installnpm start- typescript
commanderchalkseedrandom
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.