MCPcopy
hub / github.com/coder/mux / MockNotification

Class MockNotification

tests/ui/compaction/compaction.test.ts:367–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365 // Mock Notification constructor - must be on globalThis since happy-dom
366 // aliases window = globalThis in our test setup
367 class MockNotification {
368 onclick: (() => void) | null = null;
369 constructor(title: string, options?: { body?: string }) {
370 notifications.push({ title, body: options?.body });
371 }
372 close() {}
373 }
374
375 const mockWithPermission = Object.assign(MockNotification, {
376 permission: "granted",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected