From f3e6944fda5c7647467a252afe371c1f72ed2723 Mon Sep 17 00:00:00 2001 From: Joe Bottigliero Date: Thu, 5 Dec 2019 23:16:03 -0600 Subject: [PATCH] test: add a case for loading a configuration (issueUrlFormat) from package.json. (#486) --- test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test.js b/test.js index 278091671..f0710ffaa 100644 --- a/test.js +++ b/test.js @@ -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.