(db: PowerSyncDatabase)
| 33 | } |
| 34 | |
| 35 | async function createTestProducts(db: PowerSyncDatabase) { |
| 36 | await db.execute(` |
| 37 | INSERT INTO products (id, name, price, category) |
| 38 | VALUES |
| 39 | (uuid(), 'Product A', 50, 'electronics'), |
| 40 | (uuid(), 'Product B', 150, 'electronics'), |
| 41 | (uuid(), 'Product C', 25, 'clothing'), |
| 42 | (uuid(), 'Product D', 200, 'electronics'), |
| 43 | (uuid(), 'Product E', 75, 'clothing') |
| 44 | `) |
| 45 | } |
| 46 | |
| 47 | it(`eager mode: should call onLoad on sync start and onUnload on cleanup`, async () => { |
| 48 | const db = await createDatabase() |
no test coverage detected