()
| 1754 | |
| 1755 | describe(`nested includes: toArray → Collection`, () => { |
| 1756 | function buildToArrayToCollectionQuery() { |
| 1757 | return createLiveQueryCollection((q) => |
| 1758 | q.from({ p: projects }).select(({ p }) => ({ |
| 1759 | id: p.id, |
| 1760 | name: p.name, |
| 1761 | issues: toArray( |
| 1762 | q |
| 1763 | .from({ i: issues }) |
| 1764 | .where(({ i }) => eq(i.projectId, p.id)) |
| 1765 | .select(({ i }) => ({ |
| 1766 | id: i.id, |
| 1767 | title: i.title, |
| 1768 | comments: q |
| 1769 | .from({ c: comments }) |
| 1770 | .where(({ c }) => eq(c.issueId, i.id)) |
| 1771 | .select(({ c }) => ({ |
| 1772 | id: c.id, |
| 1773 | body: c.body, |
| 1774 | })), |
| 1775 | })), |
| 1776 | ), |
| 1777 | })), |
| 1778 | ) |
| 1779 | } |
| 1780 | |
| 1781 | it(`initial load: issues are arrays, comments are Collections`, async () => { |
| 1782 | const collection = buildToArrayToCollectionQuery() |
no test coverage detected
searching dependent graphs…