MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / makeSubscription

Function makeSubscription

apps/ui/src/hooks/useWebPush.hooks.test.tsx:37–47  ·  view source on GitHub ↗
(endpoint: string)

Source from the content-addressed store, hash-verified

35}
36
37function makeSubscription(endpoint: string): ISubscriptionMock {
38 return {
39 endpoint,
40 expirationTime: null,
41 toJSON: () => ({
42 endpoint,
43 keys: { p256dh: "p256dh-key", auth: "auth-key" }
44 }),
45 unsubscribe: vi.fn().mockResolvedValue(true)
46 };
47}
48
49interface ISetupOptions {
50 permission?: NotificationPermission;

Callers 2

setupSupportedBrowserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected