This repository has been archived on 2026-06-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
headlamp-kube-vip-plugin/vitest.config.mts
T
gandalf-the-greybeard[bot] f575621d25 fix: add explicit dev dependencies and fix React test environment
- Add react, react-dom, vitest, jsdom, and testing-library as explicit
  devDependencies instead of relying on transitive deps from
  @kinvolk/headlamp-plugin
- Add peerDependencies for react/react-dom
- Set process.env.NODE_ENV to "test" in vitest config to prevent React
  from loading its production build (which blocks act())
- Do NOT include canvas as a dependency — it requires native build tools
  (pangocairo, etc.) not present in the CI node:22 container

Fixes CI install failures from prior PR #10 which included canvas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 06:44:31 +00:00

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