MCPcopy Index your code
hub / github.com/coder/mux / waitForNewNotifications

Function waitForNewNotifications

tests/ui/compaction/compaction.test.ts:436–444  ·  view source on GitHub ↗

Wait for new notifications after seed, return count and last notification

(countAfterSeed: number)

Source from the content-addressed store, hash-verified

434
435 /** Wait for new notifications after seed, return count and last notification */
436 async function waitForNewNotifications(countAfterSeed: number) {
437 await waitFor(() => expect(notifications.length).toBeGreaterThanOrEqual(countAfterSeed + 1), {
438 timeout: 5_000,
439 });
440 return {
441 newCount: notifications.length - countAfterSeed,
442 last: notifications[notifications.length - 1],
443 };
444 }
445
446 test("queued auto-follow-up should fire only ONE notification (for the follow-up response)", async () => {
447 const { app, countAfterSeed, cleanup } = await setupNotificationTest(

Callers 1

compaction.test.tsFile · 0.85

Calls 1

waitForFunction · 0.50

Tested by

no test coverage detected