(pathname: string, match: RegExp)
| 84 | await validateResponse('/home', /yay home works/); |
| 85 | |
| 86 | async function validateResponse(pathname: string, match: RegExp): Promise<void> { |
| 87 | const response = await fetch(new URL(pathname, `http://localhost:${port}`)); |
| 88 | const text = await response.text(); |
| 89 | assert.match(text, match); |
| 90 | assert.equal(response.status, 200); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | async function modifyFileAndWaitUntilUpdated( |
no test coverage detected