(pathname: string, match: RegExp)
| 101 | await validateResponse('/home', /yay home works/); |
| 102 | |
| 103 | async function validateResponse(pathname: string, match: RegExp): Promise<void> { |
| 104 | const response = await fetch(new URL(pathname, `http://localhost:${port}`)); |
| 105 | const text = await response.text(); |
| 106 | assert.match(text, match); |
| 107 | assert.equal(response.status, 200); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | async function modifyFileAndWaitUntilUpdated( |
no test coverage detected