Skip to content

Commit

Permalink
test: adds a test for packageFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
jbottigliero committed Aug 24, 2019
1 parent 5df2c39 commit d63e86e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test.js
Expand Up @@ -965,6 +965,31 @@ describe('standard-version', function () {
})
})

describe('custom `packageFiles` support', function () {
it('reads and writes to a custom `plain-text` file', function () {
fs.copyFileSync('../test/mocks/VERSION-6.3.1.txt', 'VERSION_TRACKER.txt')
commit('feat: yet another commit')
return require('./index')({
silent: true,
packageFiles: [
{
filename: 'VERSION_TRACKER.txt',
type: 'plain-text'
}
],
bumpFiles: [
{
filename: 'VERSION_TRACKER.txt',
type: 'plain-text'
}
]
})
.then(() => {
fs.readFileSync('VERSION_TRACKER.txt', 'utf-8').should.equal('6.4.0')
})
})
})

describe('npm-shrinkwrap.json support', function () {
beforeEach(function () {
writeNpmShrinkwrapJson('1.0.0')
Expand Down

0 comments on commit d63e86e

Please sign in to comment.