Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/__test__/ref-helper.test.ts
diff options
context:
space:
mode:
authorOrhan Toy <orhantoy@github.com>2024-06-12 17:01:40 +0200
committerGitHub <noreply@github.com>2024-06-12 11:01:40 -0400
commit798b08b7113201b0aac9404bba2bdf31ca943949 (patch)
tree4b17b6954bbaf43b4785ff738f01191cf00444ea /__test__/ref-helper.test.ts
parent300c0f8bc3145127512c68abed424bbdf093c924 (diff)
Handle hidden refs (#1774)
Co-authored-by: Chris Gavin <chris@chrisgavin.me>
Diffstat (limited to '__test__/ref-helper.test.ts')
-rw-r--r--__test__/ref-helper.test.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/__test__/ref-helper.test.ts b/__test__/ref-helper.test.ts
index 8a8302a..d3b00b7 100644
--- a/__test__/ref-helper.test.ts
+++ b/__test__/ref-helper.test.ts
@@ -67,6 +67,16 @@ describe('ref-helper tests', () => {
expect(checkoutInfo.startPoint).toBeFalsy()
})
+ it('getCheckoutInfo refs/', async () => {
+ const checkoutInfo = await refHelper.getCheckoutInfo(
+ git,
+ 'refs/gh/queue/main/pr-123',
+ commit
+ )
+ expect(checkoutInfo.ref).toBe(commit)
+ expect(checkoutInfo.startPoint).toBeFalsy()
+ })
+
it('getCheckoutInfo unqualified branch only', async () => {
git.branchExists = jest.fn(async (remote: boolean, pattern: string) => {
return true