- introduce better handling of cases in which invalid references are provided, return an empty changelog and send out error

This commit is contained in:
Mike Penz
2020-10-17 17:38:08 +02:00
parent 5ce9cb0351
commit 619d3f460e
3 changed files with 47 additions and 6 deletions
+17
View File
@@ -21,6 +21,23 @@ test('test runs', () => {
console.log(cp.execSync(`node ${ip}`, options).toString())
})
*/
it('Should have empty changelog (tags)', async () => {
jest.setTimeout(180000)
const configuration = readConfiguration('configs/configuration.json')
const releaseNotes = new ReleaseNotes({
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: 'v0.0.1',
toTag: 'v0.0.2',
ignorePreReleases: false,
configuration: configuration
})
const changeLog = await releaseNotes.pull()
console.log(changeLog)
expect(changeLog).toStrictEqual(`- no changes`)
})
it('Should match generated changelog (tags)', async () => {
jest.setTimeout(180000)