fix: add missing test dependencies to devDependencies
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: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"test"',
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
|
||||
Reference in New Issue
Block a user