(pathname: string, match: RegExp)
| 53 | await validateResponse('/', /Hello,/); |
| 54 | |
| 55 | async function validateResponse(pathname: string, match: RegExp): Promise<void> { |
| 56 | const response = await fetch(new URL(pathname, `http://localhost:${port}`)); |
| 57 | const text = await response.text(); |
| 58 | assert.match(text, match); |
| 59 | } |
| 60 | } |
no test coverage detected