Skip to content

Commit 095e1eb

Browse files
authoredOct 19, 2021
test: updates .gitignore test to check against a default package and bump file found in the gitignore (conventional-changelog#841)
1 parent fb3f3fa commit 095e1eb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
 

‎test/core.spec.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,22 @@ describe('standard-version', function () {
645645
mock({
646646
bump: 'minor',
647647
fs: {
648-
'.gitignore': 'bower.json',
649-
'bower.json': JSON.stringify({ version: '1.0.0' })
648+
'.gitignore': 'package-lock.json\nbower.json',
649+
// test a defaults.packageFiles
650+
'bower.json': JSON.stringify({ version: '1.0.0' }),
651+
// test a defaults.bumpFiles
652+
'package-lock.json': JSON.stringify({
653+
name: '@org/package',
654+
version: '1.0.0',
655+
lockfileVersion: 1
656+
})
650657
},
651658
tags: ['v1.0.0']
652659
})
653660
await exec()
661+
JSON.parse(fs.readFileSync('package-lock.json', 'utf-8')).version.should.equal(
662+
'1.0.0'
663+
)
654664
JSON.parse(fs.readFileSync('bower.json', 'utf-8')).version.should.equal(
655665
'1.0.0'
656666
)

0 commit comments

Comments
 (0)
Please sign in to comment.