From 9971b23498d25dec26c58ad971ccce8d6b676dcf Mon Sep 17 00:00:00 2001 From: Steve King Date: Thu, 2 Feb 2023 08:29:58 +0000 Subject: [PATCH] Update push.spec.ts --- simple-git/test/unit/push.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/simple-git/test/unit/push.spec.ts b/simple-git/test/unit/push.spec.ts index 1036a801..9f942ccb 100644 --- a/simple-git/test/unit/push.spec.ts +++ b/simple-git/test/unit/push.spec.ts @@ -103,6 +103,19 @@ describe('push', () => { return aPushedBranch(local, remote, state, false); } + it('will not match ill-formed push lines', () => { + givenTheResponse({ + stdOut: [ + '* refs/tags/tag-one:refs/tags/tag-one [up to date]', + '2 refs/tags/tag-one:refs/tags/tag-one [up to date]', + '= refs/tags/tag-one:refs/tags/tag-one [up to date]', + ].join('\n'), + stdErr: '', + }); + + expect(actual.pushed).toHaveLength(2); + }); + it('parses pushing tags as well as branches', () => { givenTheResponse(pushNewBranchWithTags); expect(actual).toEqual(