- Add Vitest integration test config with sequential execution - Create test helpers (auth, cleanup, SSE parser, API client) - Create test data factories for agents and collections - Add test context manager for unified test setup - Create integration tests for: - Health and stats endpoints - Tools list and search - Collections CRUD - Agents CRUD and conversations - MCP HTTP transport - User profile, API keys, and usage - Public agents and collections - Sync endpoints (cron-authenticated) - Add GitHub Actions workflow running on push to main - Add cleanup-orphans script for test data cleanup - Add setup-test-credentials script for generating auth tokens
23 lines
617 B
TypeScript
23 lines
617 B
TypeScript
import { resolve } from 'node:path';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['src/test/integration/**/*.integration.test.ts'],
|
|
setupFiles: ['./src/test/integration/setup-integration.ts'],
|
|
testTimeout: 60000, // 60s for API calls to production
|
|
// Run tests sequentially to avoid race conditions on shared test data
|
|
sequence: {
|
|
concurrent: false,
|
|
},
|
|
// Fail fast on integration tests
|
|
bail: 5,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'~': resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
});
|