mirror of
https://github.com/FluxaMedia/fluxa-desktop.git
synced 2026-07-26 20:02:09 +00:00
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.
11 lines
237 B
TypeScript
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'],
|
|
},
|
|
});
|