Skip to content
This repository has been archived by the owner on Sep 18, 2017. It is now read-only.

Commit

Permalink
test: added specs for new patch types
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonenglish committed Jul 22, 2017
1 parent 69202ee commit f864e08
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = function (pluginConfig, {commits}, cb) {

if (commit.type === 'feat') type = 'minor'

if (!type && MINOR_TYPES.indexOf(commit.type) != -1) type = 'patch'
if (!type && MINOR_TYPES.indexOf(commit.type) !== -1) type = 'patch'

return true
})
Expand Down
17 changes: 16 additions & 1 deletion test/specs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test('derive version number from commits', (t) => {
analyzer({}, {
commits: [{
hash: 'asdf',
message: 'chore: build script'
message: 'build script'
}]
}, (err, type) => {
tt.error(err)
Expand All @@ -27,6 +27,21 @@ test('derive version number from commits', (t) => {
}, {
hash: '1234',
message: 'fix(scope): even nastier bug'
}, {
hash: '1234',
message: 'docs(scope): even nastier bug'
}, {
hash: '1234',
message: 'style(scope): even nastier bug'
}, {
hash: '1234',
message: 'refactor(scope): even nastier bug'
}, {
hash: '1234',
message: 'chore(scope): even nastier bug'
}, {
hash: '1234',
message: 'test(scope): even nastier bug'
}]
}, (err, type) => {
tt.error(err)
Expand Down

0 comments on commit f864e08

Please sign in to comment.