2024-02-19 19:03:51 +02:00
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
|
2024-02-29 22:10:08 +02:00
|
|
|
// skip `docker compose up` if `make e2e` was already run
|
|
|
|
const globalSetup: string[] = [];
|
|
|
|
try {
|
|
|
|
await fetch('http://127.0.0.1:2283/api/server-info/ping');
|
|
|
|
} catch {
|
|
|
|
globalSetup.push('src/setup.ts');
|
|
|
|
}
|
|
|
|
|
2024-02-19 19:03:51 +02:00
|
|
|
export default defineConfig({
|
|
|
|
test: {
|
2024-02-20 00:25:57 +02:00
|
|
|
include: ['src/{api,cli}/specs/*.e2e-spec.ts'],
|
2024-02-29 22:10:08 +02:00
|
|
|
globalSetup,
|
2024-03-07 17:14:36 +02:00
|
|
|
testTimeout: 10_000,
|
2024-02-19 19:03:51 +02:00
|
|
|
poolOptions: {
|
|
|
|
threads: {
|
|
|
|
singleThread: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|