(path: string)
| 50 | } |
| 51 | |
| 52 | export async function expectNoClientErrors (path: string) { |
| 53 | const ctx = useTestContext() |
| 54 | if (!ctx.options.browser) { |
| 55 | return |
| 56 | } |
| 57 | |
| 58 | const { page, pageErrors, consoleLogs } = (await renderPage(path))! |
| 59 | |
| 60 | expect(pageErrors).toEqual([]) |
| 61 | expectNoErrorsOrWarnings(consoleLogs) |
| 62 | |
| 63 | await page.close() |
| 64 | } |
| 65 | |
| 66 | export function expectNoErrorsOrWarnings (consoleLogs: Array<{ type: string, text: string }>) { |
| 67 | const consoleLogErrors = consoleLogs.filter(i => i.type === 'error') |
no test coverage detected
searching dependent graphs…