/**
 * 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))
}

