(
collection: Collection<any, any, any, any, any>,
itemId: string,
timeout: number = 2000,
)
| 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( |
no test coverage detected