Skip to content

Commit f3e6944

Browse files
jbottiglierotommywo
authored andcommitted
test: add a case for loading a configuration (issueUrlFormat) from package.json. (#486)
1 parent 995e592 commit f3e6944

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,22 @@ describe('standard-version', function () {
10731073
})
10741074

10751075
describe('configuration', () => {
1076+
it('reads config from package.json', function () {
1077+
writePackageJson('1.0.0', {
1078+
repository: {
1079+
url: 'git+https://[email protected]/office/app.git'
1080+
},
1081+
'standard-version': {
1082+
issueUrlFormat: 'https://standard-version.company.net/browse/{{id}}'
1083+
}
1084+
})
1085+
commit('feat: another commit addresses issue #1')
1086+
execCli()
1087+
// CHANGELOG should have the new issue URL format.
1088+
const content = fs.readFileSync('CHANGELOG.md', 'utf-8')
1089+
content.should.include('https://standard-version.company.net/browse/1')
1090+
})
1091+
10761092
it('reads config from .versionrc', function () {
10771093
// write configuration that overrides default issue
10781094
// URL format.

0 commit comments

Comments
 (0)