- add tests to verify specific from, to
- add test to verify specific from, to hashes
This commit is contained in:
+47
-1
@@ -22,7 +22,30 @@ test('test runs', () => {
|
|||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
|
|
||||||
it('Should be true', async () => {
|
it('Should match generated changelog (tags)', async () => {
|
||||||
|
jest.setTimeout(180000)
|
||||||
|
|
||||||
|
const configuration = readConfiguration('configuration.json')
|
||||||
|
const releaseNotes = new ReleaseNotes({
|
||||||
|
owner: 'mikepenz',
|
||||||
|
repo: 'release-changelog-builder-action',
|
||||||
|
fromTag: 'v0.0.1',
|
||||||
|
toTag: 'v0.0.3',
|
||||||
|
ignorePreReleases: false,
|
||||||
|
configuration: configuration
|
||||||
|
})
|
||||||
|
|
||||||
|
const changeLog = await releaseNotes.pull()
|
||||||
|
console.log(changeLog)
|
||||||
|
expect(changeLog).toStrictEqual(`## 🧪 Tests
|
||||||
|
|
||||||
|
- [CI] Specify Test Case
|
||||||
|
- PR: #10
|
||||||
|
|
||||||
|
`)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Should match generated changelog (unspecified fromTag)', async () => {
|
||||||
jest.setTimeout(180000)
|
jest.setTimeout(180000)
|
||||||
|
|
||||||
const configuration = readConfiguration('configuration.json')
|
const configuration = readConfiguration('configuration.json')
|
||||||
@@ -44,3 +67,26 @@ it('Should be true', async () => {
|
|||||||
|
|
||||||
`)
|
`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('Should match generated changelog (refs)', async () => {
|
||||||
|
jest.setTimeout(180000)
|
||||||
|
|
||||||
|
const configuration = readConfiguration('configuration.json')
|
||||||
|
const releaseNotes = new ReleaseNotes({
|
||||||
|
owner: 'mikepenz',
|
||||||
|
repo: 'release-changelog-builder-action',
|
||||||
|
fromTag: '5ec7a2d86fe9f43fdd38d5e254a1117c8a51b4c3',
|
||||||
|
toTag: 'fa3788c8c4b3373ef8424ce3eb008a5cd07cc5aa',
|
||||||
|
ignorePreReleases: false,
|
||||||
|
configuration: configuration
|
||||||
|
})
|
||||||
|
|
||||||
|
const changeLog = await releaseNotes.pull()
|
||||||
|
console.log(changeLog)
|
||||||
|
expect(changeLog).toStrictEqual(`## 🧪 Tests
|
||||||
|
|
||||||
|
- [CI] Specify Test Case
|
||||||
|
- PR: #10
|
||||||
|
|
||||||
|
`)
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user