- recompile dist

This commit is contained in:
Mike Penz
2022-07-30 09:04:48 +02:00
parent 2f418c46e5
commit 4cc48881f7
6 changed files with 150 additions and 221 deletions
+31 -59
View File
@@ -14,8 +14,8 @@ it('Should have empty changelog (tags)', async () => {
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: 'v0.0.1' },
toTag: { name: 'v0.0.2' },
fromTag: {name: 'v0.0.1'},
toTag: {name: 'v0.0.2'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -26,7 +26,7 @@ it('Should have empty changelog (tags)', async () => {
const changeLog = await releaseNotes.pull()
console.log(changeLog)
expect(changeLog).toStrictEqual("- no changes")
expect(changeLog).toStrictEqual('- no changes')
})
it('Should match generated changelog (tags)', async () => {
@@ -34,8 +34,8 @@ it('Should match generated changelog (tags)', async () => {
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: 'v0.0.1'},
toTag: { name: 'v0.0.3' },
fromTag: {name: 'v0.0.1'},
toTag: {name: 'v0.0.3'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -55,15 +55,12 @@ it('Should match generated changelog (tags)', async () => {
})
it('Should match generated changelog (refs)', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_all_placeholders.json'
)
const configuration = resolveConfiguration('', 'configs_test/configuration_all_placeholders.json')
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: '5ec7a2d86fe9f43fdd38d5e254a1117c8a51b4c3' },
toTag: { name: 'fa3788c8c4b3373ef8424ce3eb008a5cd07cc5aa' },
fromTag: {name: '5ec7a2d86fe9f43fdd38d5e254a1117c8a51b4c3'},
toTag: {name: 'fa3788c8c4b3373ef8424ce3eb008a5cd07cc5aa'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -91,15 +88,12 @@ nhoelzl
})
it('Should match generated changelog and replace all occurrences (refs)', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_replace_all_placeholders.json'
)
const configuration = resolveConfiguration('', 'configs_test/configuration_replace_all_placeholders.json')
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: '5ec7a2d86fe9f43fdd38d5e254a1117c8a51b4c3' },
toTag: { name: 'fa3788c8c4b3373ef8424ce3eb008a5cd07cc5aa' },
fromTag: {name: '5ec7a2d86fe9f43fdd38d5e254a1117c8a51b4c3'},
toTag: {name: 'fa3788c8c4b3373ef8424ce3eb008a5cd07cc5aa'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -129,15 +123,12 @@ nhoelzl
})
it('Should match ordered ASC', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_asc.json'
)
const configuration = resolveConfiguration('', 'configs_test/configuration_asc.json')
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: 'v0.3.0' },
toTag: { name: 'v0.5.0' },
fromTag: {name: 'v0.3.0'},
toTag: {name: 'v0.5.0'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -148,21 +139,16 @@ it('Should match ordered ASC', async () => {
const changeLog = await releaseNotes.pull()
console.log(changeLog)
expect(changeLog).toStrictEqual(
`## 🚀 Features\n\n22\n24\n25\n26\n28\n\n## 🐛 Fixes\n\n23\n\n`
)
expect(changeLog).toStrictEqual(`## 🚀 Features\n\n22\n24\n25\n26\n28\n\n## 🐛 Fixes\n\n23\n\n`)
})
it('Should match ordered DESC', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_desc.json'
)
const configuration = resolveConfiguration('', 'configs_test/configuration_desc.json')
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: 'v0.3.0' },
toTag: { name: 'v0.5.0' },
fromTag: {name: 'v0.3.0'},
toTag: {name: 'v0.5.0'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -173,21 +159,16 @@ it('Should match ordered DESC', async () => {
const changeLog = await releaseNotes.pull()
console.log(changeLog)
expect(changeLog).toStrictEqual(
`## 🚀 Features\n\n28\n26\n25\n24\n22\n\n## 🐛 Fixes\n\n23\n\n`
)
expect(changeLog).toStrictEqual(`## 🚀 Features\n\n28\n26\n25\n24\n22\n\n## 🐛 Fixes\n\n23\n\n`)
})
it('Should match ordered by title ASC', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_sort_title_asc.json'
)
const configuration = resolveConfiguration('', 'configs_test/configuration_sort_title_asc.json')
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: 'v0.3.0' },
toTag: { name: 'v0.5.0' },
fromTag: {name: 'v0.3.0'},
toTag: {name: 'v0.5.0'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -204,15 +185,12 @@ it('Should match ordered by title ASC', async () => {
})
it('Should match ordered by title DESC', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_sort_title_desc.json'
)
const configuration = resolveConfiguration('', 'configs_test/configuration_sort_title_desc.json')
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: 'v0.3.0' },
toTag: { name: 'v0.5.0' },
fromTag: {name: 'v0.3.0'},
toTag: {name: 'v0.5.0'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -229,15 +207,12 @@ it('Should match ordered by title DESC', async () => {
})
it('Should ignore PRs not merged into develop branch', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_base_branches_develop.json'
)
const configuration = resolveConfiguration('', 'configs_test/configuration_base_branches_develop.json')
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: 'v1.3.1' },
toTag: { name: 'v1.4.0' },
fromTag: {name: 'v1.3.1'},
toTag: {name: 'v1.4.0'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,
@@ -252,15 +227,12 @@ it('Should ignore PRs not merged into develop branch', async () => {
})
it('Should ignore PRs not merged into main branch', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_base_branches_main.json'
)
const configuration = resolveConfiguration('', 'configs_test/configuration_base_branches_main.json')
const releaseNotes = new ReleaseNotes(octokit, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: { name: 'v1.3.1' },
toTag: { name: 'v1.4.0' },
fromTag: {name: 'v1.3.1'},
toTag: {name: 'v1.4.0'},
includeOpen: false,
failOnError: false,
fetchReviewers: false,