Skip to content

Commit c1b3ec6

Browse files
committed
test: fix new strings in the unit tests
1 parent 7fcecaf commit c1b3ec6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/getReleaseLine.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ export const getReleaseLine: GetReleaseLine = async (changeset, _type, options)
118118
.split('\n')
119119
.map((line) => linkifyIssue(line.trimEnd(), options['repo']));
120120

121-
const prMessage = pull ? `(${pull})` : '';
122-
const commitMessage = commit ? `(${commit})` : '';
121+
const prMessage = pull ? `${pull}` : '';
122+
const commitMessage = commit ? `${commit}` : '';
123123
// istanbul ignore next: because of our mocked get-github-info -- @preserve
124124
const printPrOrCommit = (pull !== '' ? prMessage : commitMessage).trim();
125125
const prefix = printPrOrCommit ? `${printPrOrCommit} ${userLink}: ` : '';

src/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,23 @@ describe('getReplacedChangelog', () => {
112112
);
113113
const result = await getReleaseLine(changeset, 'minor', { repo: data.repo });
114114
expect(result).toBe(
115-
'\n\n- An awesome feature. --> ([#2](https://github.com/mheob/changeset-changelog/pull/2)) by [@mheob](https://github.com/mheob)\n',
115+
'\n\n- [#2](https://github.com/mheob/changeset-changelog/pull/2) ([@mheob](https://github.com/mheob)): An awesome feature.\n',
116116
);
117117
});
118118

119119
it('should return the changelog in a string format with data from commit', async () => {
120120
const changeset = getChangeset('An awesome feature.', data.commit);
121121
const result = await getReleaseLine(changeset, 'minor', { repo: data.repo });
122122
expect(result).toBe(
123-
'\n\n- An awesome feature. --> ([#2](https://github.com/mheob/changeset-changelog/pull/2)) by [@mheob](https://github.com/mheob)\n',
123+
'\n\n- [#2](https://github.com/mheob/changeset-changelog/pull/2) ([@mheob](https://github.com/mheob)): An awesome feature.\n',
124124
);
125125
});
126126

127127
it('should return the changelog in a string format with data from commit', async () => {
128128
const changeset = getChangeset('An awesome feature, (resolves #9)', data.commit);
129129
const result = await getReleaseLine(changeset, 'minor', { repo: data.repo });
130130
expect(result).toBe(
131-
'\n\n- An awesome feature, (resolves [#9](https://github.com/mheob/changeset-changelog/issues/9)) --> ([#2](https://github.com/mheob/changeset-changelog/pull/2)) by [@mheob](https://github.com/mheob)\n',
131+
'\n\n- [#2](https://github.com/mheob/changeset-changelog/pull/2) ([@mheob](https://github.com/mheob)): An awesome feature, (resolves [#9](https://github.com/mheob/changeset-changelog/issues/9))\n',
132132
);
133133
});
134134

0 commit comments

Comments
 (0)