fix: resolve all failing frontend tests

- Fix vitest.config.ts React alias to point to local node_modules
  instead of nonexistent ancestor path (../../../../node_modules/react)
- Remove stale HQWaitingForInputSection tests (component was deleted
  in e8d332e0 but test cases were left behind)
This commit is contained in:
Lukas May
2026-03-07 00:14:44 +01:00
parent 40900a5641
commit 40ec85deb8
2 changed files with 4 additions and 116 deletions

View File

@@ -5,14 +5,12 @@ import path from 'node:path';
export default defineConfig({
plugins: [react()],
resolve: {
// Alias react to the parent monorepo's copy, matching what @testing-library
// loads react-dom from. This ensures React DOM and our components share the
// same ReactSharedInternals and hook dispatcher — preventing null-dispatcher
// errors when running tests from a git worktree.
// Ensure all React imports resolve to the same copy, preventing
// duplicate-React errors (mismatched ReactSharedInternals / hook dispatcher).
alias: {
'@': path.resolve(__dirname, './apps/web/src'),
react: path.resolve(__dirname, '../../../../node_modules/react'),
'react-dom': path.resolve(__dirname, '../../../../node_modules/react-dom'),
react: path.resolve(__dirname, 'node_modules/react'),
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
},
dedupe: ['react', 'react-dom'],
},