- Create comprehensive E2E test suite for job orchestration - Add test fixtures for Discord, BullMQ, and Prisma mocks - Implement 9 end-to-end test scenarios covering: * Happy path: webhook → job → step execution → completion * Event emission throughout job lifecycle * Step failure and retry handling * Job failure after max retries * Discord command parsing and job creation * WebSocket status updates integration * Job cancellation workflow * Job retry mechanism * Progress percentage tracking - Add helper methods to services for simplified testing: * JobStepsService: start(), complete(), fail(), findByJob() * RunnerJobsService: updateStatus(), updateProgress() * JobEventsService: findByJob() - Configure vitest.e2e.config.ts for E2E test execution - All 9 E2E tests passing - All 1405 unit tests passing - Quality gates: typecheck, lint, build all passing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34 lines
709 B
TypeScript
34 lines
709 B
TypeScript
import swc from "unplugin-swc";
|
|
import { defineConfig } from "vitest/config";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: false,
|
|
environment: "node",
|
|
include: ["test/e2e/**/*.e2e-spec.ts"],
|
|
coverage: {
|
|
provider: "v8",
|
|
reporter: ["text", "json", "html"],
|
|
exclude: ["node_modules/", "dist/", "test/"],
|
|
},
|
|
testTimeout: 30000, // E2E tests may take longer
|
|
hookTimeout: 30000,
|
|
server: {
|
|
deps: {
|
|
inline: ["@nestjs/common", "@nestjs/core"],
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
plugins: [
|
|
swc.vite({
|
|
module: { type: "es6" },
|
|
}),
|
|
],
|
|
});
|