Adds emulator-backed rules-unit tests verifying the Firestore rules committed in Task 3, including the global constraint that bookings/inquiries are never publicly readable. Excludes firebase-tests/ from the default vitest run since it needs the emulator (via `npm run test:rules`) rather than jsdom.
21 lines
533 B
TypeScript
21 lines
533 B
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
exclude: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'**/cypress/**',
|
|
'**/.{idea,git,cache,output,temp}/**',
|
|
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
|
|
'firebase-tests/**',
|
|
],
|
|
},
|
|
})
|