(link: string)
| 288 | describe('getNextPageUrl', () => { |
| 289 | it('GitHub API pagination next page is parsed correctly', () => { |
| 290 | function generateResponse(link: string) { |
| 291 | return { |
| 292 | statusCode: 200, |
| 293 | result: null, |
| 294 | headers: { |
| 295 | link: link |
| 296 | } |
| 297 | }; |
| 298 | } |
| 299 | const page1Links = |
| 300 | '<https://api.github.com/repositories/129883600/releases?page=2>; rel="next", <https://api.github.com/repositories/129883600/releases?page=3>; rel="last"'; |
| 301 | expect(getNextPageUrl(generateResponse(page1Links))).toStrictEqual( |