mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore: prevent extraneous tsconfig errors in tests (#38718)
Tests get spammed with unnecessary tsconfig errors because the Vitest config tries to use tsconfig files from the examples directory. Excluding those from tsConfigPaths for cleaner test output.
This commit is contained in:
1 parent
a054caea9b
commit
425d9ca592
1 file changed
+10
-1
@@ -1,10 +1,19 @@
|
||||
import tsconfigPaths from 'vite-tsconfig-paths'
|
||||
import { defineConfig } from 'vitest/config'
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export default defineConfig({
|
||||
test: {
|
||||
// Exclude examples from test discovery (does not affect tsconfig scanning)
|
||||
exclude: ['examples/**/*', '**/node_modules/**'],
|
||||
setupFiles: ['vitest.setup.ts'],
|
||||
},
|
||||
plugins: [tsconfigPaths({ root: import.meta.dirname })],
|
||||
// Restrict tsconfig-paths to only use this app's tsconfig
|
||||
plugins: [
|
||||
tsconfigPaths({
|
||||
root: import.meta.dirname,
|
||||
// Prevent scanning tsconfig files in subfolders like examples/**
|
||||
projects: ['tsconfig.json'],
|
||||
}),
|
||||
],
|
||||
})
|
||||
Reference in new issue
Block a user