91c5aab091
- Add 22 unit tests for ExemptionManager.tsx covering: - Failing checks extraction (pod-level, container-level, ignore-severity, dedup) - Dialog open/close, check toggle, exempt-all toggle - Apply button enabled/disabled state - ApiProxy.request called with correct path (apps/batch/core) and annotation structure - Success and error feedback states, in-flight "Applying..." label - Add vitest coverage config with >=80% threshold (lines/functions/branches/statements) - Update artifacthub-pkg.yml: - Add install section (Headlamp-native plugin installer only) - Add appVersion: "5.0" (compatible Polaris dashboard version) - Expand distro-compat from "in-cluster" to "in-cluster,web,desktop" - Add changes block documenting v1.0 features Closes privilegedescalation/headlamp-polaris-plugin#81 (partial — test and metadata tasks) Co-Authored-By: Paperclip <noreply@paperclip.ing>
25 lines
561 B
TypeScript
25 lines
561 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/**'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
include: ['src/**/*.{ts,tsx}'],
|
|
exclude: ['src/**/*.test.{ts,tsx}', 'src/test-utils.tsx', 'src/index.tsx'],
|
|
thresholds: {
|
|
lines: 80,
|
|
functions: 80,
|
|
branches: 80,
|
|
statements: 80,
|
|
},
|
|
},
|
|
},
|
|
});
|