mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-26 23:35:41 +00:00
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:
+4
-1
@@ -1,5 +1,5 @@
|
|||||||
/// <reference types="vitest" />
|
/// <reference types="vitest" />
|
||||||
import { defineConfig } from "vitest/config";
|
import { defineConfig, configDefaults } from "vitest/config";
|
||||||
import react from "@vitejs/plugin-react-swc";
|
import react from "@vitejs/plugin-react-swc";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||||
@@ -11,6 +11,9 @@ export default defineConfig(({ command }) => ({
|
|||||||
globals: true,
|
globals: true,
|
||||||
environment: 'jsdom',
|
environment: 'jsdom',
|
||||||
setupFiles: './src/tests/setup.ts',
|
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: {
|
alias: {
|
||||||
'vite-plugin-node-polyfills/shims/buffer': path.resolve(__dirname, './src/tests/mocks/buffer-shim.ts'),
|
'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'),
|
'vite-plugin-node-polyfills/shims/global': path.resolve(__dirname, './src/tests/mocks/global-shim.ts'),
|
||||||
|
|||||||
Reference in New Issue
Block a user