ci: exclude Deno supabase tests from vitest sweep

vitest's default include swept supabase/functions/**/__tests__ and
supabase/migrations/__tests__ — those are Deno tests (Deno.test + pglite)
that only run under `deno test` and fail under node/jsdom. Add supabase/**
to test.exclude so the web test run covers only the Vite app's own suites.
This commit is contained in:
2026-07-25 16:50:13 -07:00
parent 5cf55aecbf
commit 193ef34c3e
+4 -1
View File
@@ -1,5 +1,5 @@
/// <reference types="vitest" />
import { defineConfig } from "vitest/config";
import { defineConfig, configDefaults } from "vitest/config";
import react from "@vitejs/plugin-react-swc";
import path from "path";
import { nodePolyfills } from 'vite-plugin-node-polyfills';
@@ -11,6 +11,9 @@ export default defineConfig(({ command }) => ({
globals: true,
environment: 'jsdom',
setupFiles: './src/tests/setup.ts',
// supabase/** holds Deno tests (Deno.test + pglite) run via `deno test`,
// not vitest — exclude them from the web (node/jsdom) test sweep.
exclude: [...configDefaults.exclude, 'supabase/**'],
alias: {
'vite-plugin-node-polyfills/shims/buffer': path.resolve(__dirname, './src/tests/mocks/buffer-shim.ts'),
'vite-plugin-node-polyfills/shims/global': path.resolve(__dirname, './src/tests/mocks/global-shim.ts'),