(component, callCount = 1)
| 24 | }); |
| 25 | |
| 26 | async function waitForData(component, callCount = 1) { |
| 27 | await waitFor( |
| 28 | () => fetchJson.callCount === callCount, |
| 29 | 'expected fetchJson to have been called' + |
| 30 | (callCount > 1 ? ` ${callCount} times` : '') |
| 31 | ); |
| 32 | // Ensure everything has settled: |
| 33 | await macroTask(); |
| 34 | component.update(); |
| 35 | } |
| 36 | |
| 37 | describe('default behavior', () => { |
| 38 | it('should render a "loading" state first', async () => { |
no test coverage detected