2024-02-19 12:03:51 -05:00
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
|
|
2024-02-29 15:10:08 -05:00
|
|
|
// skip `docker compose up` if `make e2e` was already run
|
2026-01-09 14:59:11 +01:00
|
|
|
const globalSetup: string[] = [];
|
2024-02-29 15:10:08 -05:00
|
|
|
try {
|
2026-02-10 11:05:06 -05:00
|
|
|
await fetch('http://127.0.0.1:2285/api/server/ping');
|
2024-02-29 15:10:08 -05:00
|
|
|
} catch {
|
2026-02-10 11:05:06 -05:00
|
|
|
globalSetup.push('src/docker-compose.ts');
|
2024-02-29 15:10:08 -05:00
|
|
|
}
|
|
|
|
|
|
2024-02-19 12:03:51 -05:00
|
|
|
export default defineConfig({
|
|
|
|
|
test: {
|
2026-02-10 11:05:06 -05:00
|
|
|
include: ['src/specs/server/**/*.e2e-spec.ts'],
|
2024-02-29 15:10:08 -05:00
|
|
|
globalSetup,
|
2024-04-12 15:15:41 -04:00
|
|
|
testTimeout: 15_000,
|
2024-07-31 11:26:35 -04:00
|
|
|
pool: 'threads',
|
2024-02-19 12:03:51 -05:00
|
|
|
poolOptions: {
|
|
|
|
|
threads: {
|
|
|
|
|
singleThread: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|