Skip to content

Commit

Permalink
test: Adds a case for loading a configuration (issueUrlFormat) from p…
Browse files Browse the repository at this point in the history
…ackage.json.

- This was an attempt to reproduce conventional-changelog/conventional-changelog-config-spec#34, but it's something we didn't have explicit coverage for.
  • Loading branch information
jbottigliero committed Nov 17, 2019
1 parent dc1fa61 commit 4f2dd0c
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://[email protected]/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 4f2dd0c

Please sign in to comment.