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-sealed-secrets-plugin/headlamp-sealed-secrets/src/test-setup.ts
T
Chris Farhood cc7df73685 release: v0.2.3 - replace Material-UI icons with Iconify
Replace all Material-UI icon imports with Iconify equivalents to fix plugin loading.
Headlamp provides @iconify/react as a global, not @mui/icons-material.

Icon mappings:
- ErrorOutline → mdi:alert-circle-outline
- ContentCopy → mdi:content-copy
- Visibility → mdi:eye
- VisibilityOff → mdi:eye-off
- CheckCircle → mdi:check-circle
- Error → mdi:alert-circle
- Warning → mdi:alert
- Add → mdi:plus
- Delete → mdi:delete

Also fixed test-setup.ts lint errors (unused parameters).

Tarball checksum: SHA256:5eb6273488fdf337486311c289f8db3aa5f2505ddbe5b9dd5b8c74b1e15f0032

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 11:01:36 -05:00

28 lines
407 B
TypeScript

/**
* Test setup for Vitest
*
* Provides global mocks and utilities for testing
*/
import { beforeAll } from 'vitest';
// Mock localStorage for tests
const localStorageMock = {
getItem: () => {
return null;
},
setItem: () => {
//noop
},
removeItem: () => {
// noop
},
clear: () => {
// noop
},
};
beforeAll(() => {
global.localStorage = localStorageMock as any;
});