Skip to content

Commit

Permalink
test: add a case for loading a configuration (issueUrlFormat) from pa…
Browse files Browse the repository at this point in the history
…ckage.json. (#486)
  • Loading branch information
jbottigliero authored and tommywo committed Dec 6, 2019
1 parent 995e592 commit f3e6944
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,22 @@ describe('standard-version', function () {
})

describe('configuration', () => {
it('reads config from package.json', function () {
writePackageJson('1.0.0', {
repository: {
url: 'git+https://company@scm.org/office/app.git'
},
'standard-version': {
issueUrlFormat: 'https://standard-version.company.net/browse/{{id}}'
}
})
commit('feat: another commit addresses issue #1')
execCli()
// CHANGELOG should have the new issue URL format.
const content = fs.readFileSync('CHANGELOG.md', 'utf-8')
content.should.include('https://standard-version.company.net/browse/1')
})

it('reads config from .versionrc', function () {
// write configuration that overrides default issue
// URL format.
Expand Down

0 comments on commit f3e6944

Please sign in to comment.