Skip to content

Commit

Permalink
make tests failing
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Jan 18, 2020
1 parent ef15f01 commit 66213cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Object {
}
`;

exports[`workers/pr/release-notes getReleaseNotesMd() contains bug fix header when parsing standard-version 7.0.1 1`] = `
exports[`workers/pr/release-notes getReleaseNotesMd() does not contain version 7.0.1 when parsing standard-version 7.1.0 1`] = `
Object {
"body": "##### Features
Expand Down Expand Up @@ -68,40 +68,6 @@ Object {
}
`;
exports[`workers/pr/release-notes getReleaseNotesMd() does not contain version 7.0.1 when parsing standard-version 7.0.0 1`] = `
Object {
"body": "##### ⚠ BREAKING CHANGES
- we were accepting .version.json as a config file, rather than .versionrc.json
##### Bug Fixes
- **bump:** transmit tag prefix argument to conventionalRecommendedBump ([#393](https://github.com/conventional-changelog/standard-version/issues/393)) ([8205222](https://github.com/conventional-changelog/standard-version/commit/8205222))
- **cli:** display only one, correct default for --preset flag ([#377](https://github.com/conventional-changelog/standard-version/issues/377)) ([d17fc81](https://github.com/conventional-changelog/standard-version/commit/d17fc81))
- **commit:** don't try to process and add changelog if skipped ([#318](https://github.com/conventional-changelog/standard-version/issues/318)) ([3e4fdec](https://github.com/conventional-changelog/standard-version/commit/3e4fdec))
- **deps:** update dependency conventional-changelog-config-spec to v2 ([#352](https://github.com/conventional-changelog/standard-version/issues/352)) ([f586844](https://github.com/conventional-changelog/standard-version/commit/f586844))
- **deps:** update dependency conventional-recommended-bump to v6 ([#417](https://github.com/conventional-changelog/standard-version/issues/417)) ([4c5cad1](https://github.com/conventional-changelog/standard-version/commit/4c5cad1))
- **deps:** update dependency find-up to v4 ([#355](https://github.com/conventional-changelog/standard-version/issues/355)) ([73b35f8](https://github.com/conventional-changelog/standard-version/commit/73b35f8))
- **deps:** update dependency find-up to v4.1.0 ([#383](https://github.com/conventional-changelog/standard-version/issues/383)) ([b621a4a](https://github.com/conventional-changelog/standard-version/commit/b621a4a))
- **deps:** update dependency git-semver-tags to v3 ([#418](https://github.com/conventional-changelog/standard-version/issues/418)) ([1ce3f4a](https://github.com/conventional-changelog/standard-version/commit/1ce3f4a))
- **deps:** update dependency semver to v6.3.0 ([#366](https://github.com/conventional-changelog/standard-version/issues/366)) ([cd866c7](https://github.com/conventional-changelog/standard-version/commit/cd866c7))
- **deps:** update dependency yargs to v13.3.0 ([#401](https://github.com/conventional-changelog/standard-version/issues/401)) ([3d0e8c7](https://github.com/conventional-changelog/standard-version/commit/3d0e8c7))
- adds support for \`releaseCommitMessageFormat\` ([#351](https://github.com/conventional-changelog/standard-version/issues/351)) ([a7133cc](https://github.com/conventional-changelog/standard-version/commit/a7133cc))
- stop suggesting npm publish if package.json was not updated ([#319](https://github.com/conventional-changelog/standard-version/issues/319)) ([a5ac845](https://github.com/conventional-changelog/standard-version/commit/a5ac845))
- Updates package.json to _actual_ supported (tested) NodeJS versions. ([#379](https://github.com/conventional-changelog/standard-version/issues/379)) ([15eec8a](https://github.com/conventional-changelog/standard-version/commit/15eec8a))
- **deps:** update dependency yargs to v13.2.4 ([#356](https://github.com/conventional-changelog/standard-version/issues/356)) ([00b2ce6](https://github.com/conventional-changelog/standard-version/commit/00b2ce6))
- update config file name in command based on README.md ([#357](https://github.com/conventional-changelog/standard-version/issues/357)) ([ce44dd2](https://github.com/conventional-changelog/standard-version/commit/ce44dd2))
##### [6.0.1](https://github.com/conventional-changelog/standard-version/compare/v6.0.0...v6.0.1) (2019-05-05)
##### Bug Fixes
- don't pass args to git rev-parse ([1ac72f7](https://github.com/conventional-changelog/standard-version/commit/1ac72f7))
",
"url": "https://github.com/conventional-changelog/standard-version/blob/master/CHANGELOG.md#700httpsgithubcomconventional-changelogstandard-versioncomparev601v700-2019-07-30",
}
`;
exports[`workers/pr/release-notes getReleaseNotesMd() parses angular.js 1`] = `
Object {
"body": "#### Bug Fixes
Expand Down
26 changes: 5 additions & 21 deletions test/workers/pr/changelog/release-notes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,27 +203,11 @@ describe('workers/pr/release-notes', () => {
'https://github.com/',
'https://api.github.com/'
);
expect(res).not.toBeNull();
expect(res).toMatchSnapshot();
});
it('does not contain version 7.0.1 when parsing standard-version 7.0.0', async () => {
ghGot
.mockResolvedValueOnce({ body: contentsResponse })
.mockResolvedValueOnce({
body: {
content: Buffer.from(standardVersionChangelogMd).toString('base64'),
},
});
const res = await getReleaseNotesMd(
'conventional-changelog/standard-version',
'7.0.0',
'https://github.com/',
'https://api.github.com/'
);
expect(res.body).toEqual(expect.not.stringContaining('7.0.1'));
expect(res).toMatchSnapshot();
expect(res).not.toBeNull();
expect(res.body.split('### Bug Fixes').length).toBe(2);
});
it('contains bug fix header when parsing standard-version 7.0.1', async () => {
it('does not contain version 7.0.1 when parsing standard-version 7.1.0', async () => {
ghGot
.mockResolvedValueOnce({ body: contentsResponse })
.mockResolvedValueOnce({
Expand All @@ -233,12 +217,12 @@ describe('workers/pr/release-notes', () => {
});
const res = await getReleaseNotesMd(
'conventional-changelog/standard-version',
'7.0.1',
'7.1.0',
'https://github.com/',
'https://api.github.com/'
);
expect(res.body).toEqual(expect.stringMatching(/bug fixes/i));
expect(res).toMatchSnapshot();
expect(res.body.includes('[7.0.1]')).toBe(false);
});
});
});

0 comments on commit 66213cb

Please sign in to comment.