Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: run tests shuffled #1645

Merged
merged 13 commits into from
Feb 1, 2023
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite';

const VITEST_SEQUENCE_SEED = Date.now();

console.log('VITEST_SEQUENCE_SEED', VITEST_SEQUENCE_SEED);

// https://vitejs.dev/config/
export default defineConfig({
test: {
Expand All @@ -10,6 +14,10 @@ export default defineConfig({
include: ['src'],
},
reporters: 'basic',
sequence: {
seed: VITEST_SEQUENCE_SEED,
shuffle: true,
},
onConsoleLog(log, type) {
if (
type === 'stderr' &&
Expand Down