MCPcopy Create free account
hub / github.com/TanStack/db / waitForItemRemoved

Function waitForItemRemoved

packages/db-collection-e2e/src/suites/moves.suite.ts:110–119  ·  view source on GitHub ↗
(
      collection: Collection<any, any, any, any, any>,
      itemId: string,
      timeout: number = 2000,
    )

Source from the content-addressed store, hash-verified

108
109 // Helper to wait for a specific item to disappear
110 async function waitForItemRemoved(
111 collection: Collection<any, any, any, any, any>,
112 itemId: string,
113 timeout: number = 2000,
114 ) {
115 await waitFor(() => !collection.has(itemId), {
116 timeout,
117 message: `Item ${itemId} was not removed from collection`,
118 })
119 }
120
121 // Helper to wait for users to be synced to Electric/TanStack DB
122 async function waitForUsersSynced(

Callers 1

runTestsForSyncModeFunction · 0.85

Calls 2

waitForFunction · 0.90
hasMethod · 0.45

Tested by

no test coverage detected