Tests are failing
mitar opened this issue · comments
When I try to run tests, they fail:
> @release-it/keep-a-changelog@2.3.0 test
> bron test.js
✔ should throw for missing changelog file
✔ should throw for missing "unreleased" section
✖ should write changelog
Error: Missing section for previous release ("undefined") in CHANGELOG-FULL.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:71:3
✖ should not write changelog in dry run
Error: Missing section for previous release ("undefined") in CHANGELOG-DRYRUN.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:93:3
✖ should not write changelog with keep unreleased option
Error: Missing section for previous release ("undefined") in CHANGELOG-DRYRUN.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:100:3
✖ should find changelog even if less new lines is used
Error: Missing section for previous release ("undefined") in CHANGELOG-LESS_NEW_LINES.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:107:3
✖ should write changelog with different EOL
Error: Missing section for previous release ("undefined") in CHANGELOG-EOL.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:114:3
✖ should write changelog and add unreleased section
Error: Missing section for previous release ("undefined") in CHANGELOG-UNRELEASED.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:125:3
✖ should add links to the end of the file
Error: Missing section for previous release ("undefined") in CHANGELOG-VERSION_URL.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:143:3
✖ should add links with custom head to the end of the file
Error: Missing section for previous release ("undefined") in CHANGELOG-VERSION_URL_HEAD.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:161:3
✖ should add unreleased section and links to the end of the file
Error: Missing section for previous release ("undefined") in CHANGELOG-VERSION_URL_UNRELEASED.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async /home/user/keep-a-changelog/test.js:181:3
✖ should throw for empty "unreleased" section
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /There are no entries under "Unreleased" section in CHANGELOG-EMPTY\.md/. Input:
'Error: Missing section for previous release ("undefined") in CHANGELOG-EMPTY.md.'
at async /home/user/keep-a-changelog/test.js:52:3 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: Missing section for previous release ("undefined") in CHANGELOG-EMPTY.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async waitForActual (node:assert:792:5)
at async Function.rejects (node:assert:913:25)
at async /home/user/keep-a-changelog/test.js:52:3,
expected: /There are no entries under "Unreleased" section in CHANGELOG-EMPTY\.md/,
operator: 'rejects'
}
✖ should throw for missing section for previous release
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Missing section for previous release \("1\.0\.0"\) in CHANGELOG-MISSING\.md/. Input:
'Error: Missing section for previous release ("undefined") in CHANGELOG-MISSING.md.'
at async /home/user/keep-a-changelog/test.js:58:3 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: Missing section for previous release ("undefined") in CHANGELOG-MISSING.md.
at KeepAChangelog.getChangelog (/home/user/keep-a-changelog/index.js:47:13)
at module.exports.runTasks (/home/user/keep-a-changelog/node_modules/release-it/test/util/index.js:59:35)
at async waitForActual (node:assert:792:5)
at async Function.rejects (node:assert:913:25)
at async /home/user/keep-a-changelog/test.js:58:3,
expected: /Missing section for previous release \("1\.0\.0"\) in CHANGELOG-MISSING\.md/,
operator: 'rejects'
}
✔ should find very first changelog with disabled strict latest option
✔ should write changelog even with `strictLatest: false`
✔ should add link to the end of a new changelog
✖ 11 test(s) failed
✔ 5 test(s) passed
I cloned the repository and did npm install
and npm run test
.
OK, this broke it: release-it/release-it@f31868e
This was reverted, but not fully: release-it/release-it@824558f
Installing npm install 'release-it@14.11.6'
fixed running tests for me. :-)
Yeah, plugins can be tightly coupled to release-it versions. Apologies for the inconvenience.