fluxa-desktop/vitest.config.ts
KhooLy 18c99a66e2 Fix Discover catalog dropdown going empty on Movie/Series switch
discover.catalogs held whatever type the last fetch returned, so
switching content type raced the async refetch: the auto-select
effect could latch onto a stale catalog key from the previous type,
which then matched nothing once the real catalogs arrived. Filter
catalogs by the current contentType at the source so a mismatched
entry can never be selected.

Adds a Vitest + RTL harness (none existed) to drive the real
DiscoverScreen through the exact race condition.
2026-07-11 02:44:16 +03:00

11 lines
237 B
TypeScript

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'],
},
});