All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 3m56s
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
// vitest.config.integration.ts
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
/**
|
|
* This configuration is specifically for integration tests.
|
|
* It runs tests in a Node.js environment, as they need to interact with a live backend server.
|
|
*/
|
|
export default defineConfig({
|
|
test: {
|
|
name: 'integration',
|
|
environment: 'node',
|
|
include: ['**/*.integration.test.ts'],
|
|
// This setup script starts the backend server before tests run.
|
|
globalSetup: './src/tests/setup/integration-global-setup.ts',
|
|
testTimeout: 15000, // Increased timeout for server startup and API calls.
|
|
// "singleThread: true" is removed in modern Vitest.
|
|
// Use fileParallelism: false to ensure test files run one by one to prevent port conflicts.
|
|
fileParallelism: false,
|
|
coverage: {
|
|
provider: 'v8',
|
|
// We remove 'text' here. The final text report will be generated by `nyc` after merging.
|
|
reporter: ['html', 'json-summary', 'json'],
|
|
reportsDirectory: '.coverage/integration',
|
|
clean: true,
|
|
},
|
|
},
|
|
}); |