| 232 | const results: Array<Array<Record<string, any>>> = [] |
| 233 | |
| 234 | @Component({ |
| 235 | template: ` |
| 236 | <div> |
| 237 | <div> |
| 238 | data1: {{ queries()[0].data() ?? 'null' }}, data2: |
| 239 | {{ queries()[1].data() ?? 'null' }} |
| 240 | </div> |
| 241 | </div> |
| 242 | `, |
| 243 | changeDetection: ChangeDetectionStrategy.OnPush, |
| 244 | }) |
| 245 | class Page { |
| 246 | toString(val: any) { |
| 247 | return String(val) |
| 248 | } |
| 249 | queries = injectQueries(() => ({ |
| 250 | queries: [ |
| 251 | { |
| 252 | queryKey: key1, |
| 253 | queryFn: () => sleep(10).then(() => 1), |
| 254 | }, |
| 255 | { |
| 256 | queryKey: key2, |
| 257 | queryFn: () => sleep(100).then(() => 2), |
| 258 | }, |
| 259 | ], |
| 260 | })) |
| 261 | |
| 262 | _pushResults = effect(() => { |
| 263 | const snapshot = this.queries().map((q) => ({ data: q.data() })) |
| 264 | results.push(snapshot) |
| 265 | }) |
| 266 | } |
| 267 | |
| 268 | const rendered = await render(Page, { |
| 269 | providers: [ |
nothing calls this directly
no test coverage detected