Skip to content

Commit

Permalink
Update push.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
steveukx committed Feb 2, 2023
1 parent 066b228 commit 9971b23
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions simple-git/test/unit/push.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9971b23

Please sign in to comment.