diff --git a/lib/util/http/github.spec.ts b/lib/util/http/github.spec.ts index 6220b55921bf3c..6dff8557c4d5ab 100644 --- a/lib/util/http/github.spec.ts +++ b/lib/util/http/github.spec.ts @@ -805,5 +805,19 @@ describe('util/http/github', () => { body: 'foo', }); }); + + it('support relative path', async () => { + httpMock + .scope(githubApiHost) + .get('/foo/bar/contents/lore/ipsum.txt') + .reply(200, 'foo'); + await expect( + githubApi.getRawFile( + `${githubApiHost}/foo/bar/contents/foo/../lore/ipsum.txt`, + ), + ).resolves.toMatchObject({ + body: 'foo', + }); + }); }); });