( configureMocks: (environment: MockEnvironment, options?: Options) => () => void, options?: Options, )
| 83 | } |
| 84 | |
| 85 | async function setup( |
| 86 | configureMocks: (environment: MockEnvironment, options?: Options) => () => void, |
| 87 | options?: Options, |
| 88 | ) { |
| 89 | const { environment, user } = renderWithUser(<TestRenderer />) |
| 90 | expect(screen.getByText('Loading...')).toBeInTheDocument() |
| 91 | await waitFor(configureMocks(environment, options)) |
| 92 | await waitFor(() => { |
| 93 | expect(screen.queryByText('Loading...')).not.toBeInTheDocument() |
| 94 | }) |
| 95 | return { environment, user } |
| 96 | } |
| 97 | |
| 98 | function makeMocks(environment: MockEnvironment, options?: Options) { |
| 99 | const repoIds = options?.repoIds || ['wiki-repo-id'] |
no test coverage detected