mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
e0395ce5ed
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>
29 lines
573 B
TypeScript
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,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|