497c040dbe
vitest, @testing-library/react, @testing-library/user-event, @testing-library/jest-dom, jsdom, react, react-dom, @mui/material, and react-router-dom were all used directly but only available as transitive dependencies through @kinvolk/headlamp-plugin. pnpm's strict module resolution prevented them from being resolved. Also adds process.env.NODE_ENV="test" to vitest config so React loads its development build (required for act() support in tests). Fixes #27 Co-authored-by: gandalf-the-greybeard[bot] <gandalf-the-greybeard[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
14 lines
279 B
TypeScript
14 lines
279 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
'process.env.NODE_ENV': '"test"',
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
exclude: ['e2e/**', 'node_modules/**'],
|
|
},
|
|
});
|