mirror of
https://github.com/supabase/supabase.git
synced 2026-05-06 22:18:00 +08:00
This pull request introduces a testing setup for the Next.js app using Vitest. The main changes include the addition of a test configuration, test scripts, and a sample test for the Next.js config. It also adds relevant dependencies to support Vitest and path resolution, and updates the lock file accordingly. Testing infrastructure: * Added a sample test file `next.config.test.ts` using Vitest to verify that specific headers are present in the Next.js configuration. * Created a Vitest configuration file `vitest.config.ts` with TypeScript path resolution support via the `vite-tsconfig-paths` plugin. Scripts and dependencies: * Added `test` and `test:watch` scripts to `package.json` for running and watching tests, and included `vitest` and `vite-tsconfig-paths` as dev dependencies.
14 lines
280 B
TypeScript
14 lines
280 B
TypeScript
import tsconfigPaths from 'vite-tsconfig-paths'
|
|
import { configDefaults, defineConfig } from 'vitest/config'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tsconfigPaths({
|
|
projects: ['.'],
|
|
}),
|
|
],
|
|
test: {
|
|
exclude: [...configDefaults.exclude, '.next/*'],
|
|
},
|
|
})
|