(
collection: Collection<any, any, any, any, any>,
syncMode: SyncMode,
)
| 80 | |
| 81 | // Helper to wait for collection to be ready |
| 82 | async function waitForReady( |
| 83 | collection: Collection<any, any, any, any, any>, |
| 84 | syncMode: SyncMode, |
| 85 | ) { |
| 86 | if (syncMode === 'progressive') { |
| 87 | // For progressive mode, start sync explicitly |
| 88 | collection.startSyncImmediate() |
| 89 | } |
| 90 | await collection.preload() |
| 91 | await waitFor(() => collection.status === `ready`, { |
| 92 | timeout: 30000, |
| 93 | message: `Collection did not become ready`, |
| 94 | }) |
| 95 | } |
| 96 | |
| 97 | // Helper to wait for a specific item to appear |
| 98 | async function waitForItem( |
no test coverage detected