Files
Sankofa/src/lib/test-helpers.ts
T
defiQUG 6f28146ac3 Initial Phoenix Sankofa Cloud setup
- Complete project structure with Next.js frontend
- GraphQL API backend with Apollo Server
- Portal application with NextAuth
- Crossplane Proxmox provider
- GitOps configurations
- CI/CD pipelines
- Testing infrastructure (Vitest, Jest, Go tests)
- Error handling and monitoring
- Security hardening
- UI component library
- Documentation
2025-11-28 12:54:33 -08:00

31 lines
596 B
TypeScript

/**
* Test helper utilities
*/
/**
* Mock window.matchMedia
*/
export function mockMatchMedia() {
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: (query: string) => ({
matches: false,
media: query,
onchange: null,
addListener: () => {},
removeListener: () => {},
addEventListener: () => {},
removeEventListener: () => {},
dispatchEvent: () => false,
}),
})
}
/**
* Wait for async operations to complete
*/
export function wait(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms))
}