From 798b08b7113201b0aac9404bba2bdf31ca943949 Mon Sep 17 00:00:00 2001 From: Orhan Toy Date: Wed, 12 Jun 2024 17:01:40 +0200 Subject: Handle hidden refs (#1774) Co-authored-by: Chris Gavin --- __test__/ref-helper.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '__test__') 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 -- cgit v1.2.3