Skip to content

Commit

Permalink
test relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
secustor committed Jul 13, 2024
1 parent 6a8aeb1 commit 70cad8b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/util/http/github.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
});
});
});

0 comments on commit 70cad8b

Please sign in to comment.