()
| 1386 | |
| 1387 | describe(`toArray`, () => { |
| 1388 | function buildToArrayQuery() { |
| 1389 | return createLiveQueryCollection((q) => |
| 1390 | q.from({ p: projects }).select(({ p }) => ({ |
| 1391 | id: p.id, |
| 1392 | name: p.name, |
| 1393 | issues: toArray( |
| 1394 | q |
| 1395 | .from({ i: issues }) |
| 1396 | .where(({ i }) => eq(i.projectId, p.id)) |
| 1397 | .select(({ i }) => ({ |
| 1398 | id: i.id, |
| 1399 | title: i.title, |
| 1400 | })), |
| 1401 | ), |
| 1402 | })), |
| 1403 | ) |
| 1404 | } |
| 1405 | |
| 1406 | it(`produces arrays on parent rows, not Collections`, async () => { |
| 1407 | const collection = buildToArrayQuery() |
no test coverage detected
searching dependent graphs…