Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 13 additions & 43 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,13 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";

export default defineConfig({
plugins: [react()],
test: {
environment: "jsdom",
globals: true,
setupFiles: ["./src/test/setup.tsx"],
include: ["src/**/*.{test,spec}.{js,ts,jsx,tsx}"],
exclude: [
"node_modules",
// Pre-existing test failures (message mismatch / mock type issues)
"src/app/api/referrals/route.test.ts",
"src/app/api/webhooks/*/deliveries/route.test.ts",
"src/app/api/users/*/activity/route.test.ts",
"src/app/api/users/*/reviews/route.test.ts",
],
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
exclude: [
"node_modules/",
"src/test/",
"**/*.d.ts",
"**/*.config.*",
"**/types/**",
],
thresholds: {
statements: 85,
branches: 65,
functions: 90,
lines: 85,
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});
--- a/src/app/api/bounties/route.ts

Check failure on line 1 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.
+++ b/src/app/api/bounties/route.ts

Check failure on line 2 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.
@@ -10,7 +10,10 @@

Check failure on line 3 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.

Check failure on line 3 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

';' expected.

Check failure on line 3 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.

Check failure on line 3 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.
import { type NextRequest, NextResponse } from "next/server";

Check failure on line 4 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.
import { createClient } from "@supabase/supabase-js";

+try {

Check failure on line 7 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.
const requestBody = await request.json();
+} catch (error) {

Check failure on line 9 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.
+ return new Response(JSON.stringify({ error: "Invalid JSON" }), { status: 400 });

Check failure on line 10 in vitest.config.ts

View workflow job for this annotation

GitHub Actions / build

Expression expected.
+}

// existing code...
Loading