Files
jackwener__opencli/vitest.config.ts
jackwener e0395ce5ed test: make Vitest project order explicit
Add explicit group ordering for Vitest projects so unit tests run before e2e tests, while keeping the e2e ordering fix from PR #38.\n\nCo-authored-by: RbBtSn0w <hamiltonsnow@gmail.com>
2026-03-17 17:46:03 +08:00

29 lines
573 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
projects: [
{
test: {
name: 'unit',
include: ['src/**/*.test.ts'],
// Run unit tests before e2e tests to avoid project-level contention in CI.
sequence: {
groupOrder: 0,
},
},
},
{
test: {
name: 'e2e',
include: ['tests/**/*.test.ts'],
maxWorkers: 2,
sequence: {
groupOrder: 1,
},
},
},
],
},
});