Skip to content

Commit

Permalink
Update expected test output
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreeman committed Nov 30, 2022
1 parent 15a28bc commit 97a5b4a
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@ describe('with a changed version', () => {
await execa('git', ['rev-parse', 'v2.0.0']);
await execa('git', ['rev-parse', 'v2.0.0'], { cwd: 'upstream' });

expect(result.stdout.trim().split('\n')).toEqual([
'Previous version: 1.2.3',
'::set-output name=previous-version::1.2.3',
'Current version: 2.0.0',
'::set-output name=current-version::2.0.0',
'Creating tag v2.0.0',
'::set-output name=tag::v2.0.0',
]);
expect(result.stdout).toMatchInlineSnapshot(`
"Previous version: 1.2.3
::set-output name=previous-version::1.2.3
Current version: 2.0.0
::set-output name=current-version::2.0.0
Creating tag v2.0.0
::set-output name=tag::v2.0.0"
`);
});

test('skips tag creation when configured to', async () => {
Expand All @@ -51,12 +54,14 @@ describe('with a changed version', () => {
},
});

expect(result.stdout.trim().split('\n')).toEqual([
'Previous version: 1.2.3',
'::set-output name=previous-version::1.2.3',
'Current version: 2.0.0',
'::set-output name=current-version::2.0.0',
]);
expect(result.stdout).toMatchInlineSnapshot(`
"Previous version: 1.2.3
::set-output name=previous-version::1.2.3
Current version: 2.0.0
::set-output name=current-version::2.0.0"
`);
});
});

Expand All @@ -71,11 +76,13 @@ describe('with no version change', () => {
},
});

expect(result.stdout.trim().split('\n')).toEqual([
'Previous version: 1.2.3',
'::set-output name=previous-version::1.2.3',
'Current version: 1.2.3',
'::set-output name=current-version::1.2.3',
]);
expect(result.stdout).toMatchInlineSnapshot(`
"Previous version: 1.2.3
::set-output name=previous-version::1.2.3
Current version: 1.2.3
::set-output name=current-version::1.2.3"
`);
});
});

0 comments on commit 97a5b4a

Please sign in to comment.