Function
expectRedirectLocation
(response: Response, expectedPathWithQuery: string)
Source from the content-addressed store, hash-verified
| 33 | } |
| 34 | |
| 35 | function expectRedirectLocation(response: Response, expectedPathWithQuery: string) { |
| 36 | const location = response.headers.get('location'); |
| 37 | expect(location).toBeTruthy(); |
| 38 | const url = new URL(location ?? ''); |
| 39 | expect(`${url.pathname}${url.search}`).toBe(expectedPathWithQuery); |
| 40 | } |
| 41 | |
| 42 | describe('GET /github/link', () => { |
| 43 | beforeEach(() => { |
Tested by
no test coverage detected