Skip to content

Commit

Permalink
test: updates .gitignore test to check against a default package and …
Browse files Browse the repository at this point in the history
…bump file found in the gitignore (conventional-changelog#841)
  • Loading branch information
jbottigliero authored Oct 19, 2021
1 parent fb3f3fa commit 095e1eb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/core.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,22 @@ describe('standard-version', function () {
mock({
bump: 'minor',
fs: {
'.gitignore': 'bower.json',
'bower.json': JSON.stringify({ version: '1.0.0' })
'.gitignore': 'package-lock.json\nbower.json',
// test a defaults.packageFiles
'bower.json': JSON.stringify({ version: '1.0.0' }),
// test a defaults.bumpFiles
'package-lock.json': JSON.stringify({
name: '@org/package',
version: '1.0.0',
lockfileVersion: 1
})
},
tags: ['v1.0.0']
})
await exec()
JSON.parse(fs.readFileSync('package-lock.json', 'utf-8')).version.should.equal(
'1.0.0'
)
JSON.parse(fs.readFileSync('bower.json', 'utf-8')).version.should.equal(
'1.0.0'
)
Expand Down

0 comments on commit 095e1eb

Please sign in to comment.