()
| 1931 | |
| 1932 | describe(`nested includes: toArray → toArray`, () => { |
| 1933 | function buildToArrayToArrayQuery() { |
| 1934 | return createLiveQueryCollection((q) => |
| 1935 | q.from({ p: projects }).select(({ p }) => ({ |
| 1936 | id: p.id, |
| 1937 | name: p.name, |
| 1938 | issues: toArray( |
| 1939 | q |
| 1940 | .from({ i: issues }) |
| 1941 | .where(({ i }) => eq(i.projectId, p.id)) |
| 1942 | .select(({ i }) => ({ |
| 1943 | id: i.id, |
| 1944 | title: i.title, |
| 1945 | comments: toArray( |
| 1946 | q |
| 1947 | .from({ c: comments }) |
| 1948 | .where(({ c }) => eq(c.issueId, i.id)) |
| 1949 | .select(({ c }) => ({ |
| 1950 | id: c.id, |
| 1951 | body: c.body, |
| 1952 | })), |
| 1953 | ), |
| 1954 | })), |
| 1955 | ), |
| 1956 | })), |
| 1957 | ) |
| 1958 | } |
| 1959 | |
| 1960 | it(`initial load: both levels are arrays`, async () => { |
| 1961 | const collection = buildToArrayToArrayQuery() |
no test coverage detected
searching dependent graphs…