Skip to content

Commit

Permalink
feat(): convert first letter of subject to lower case
Browse files Browse the repository at this point in the history
closes #2
  • Loading branch information
Guria committed Jan 8, 2016
1 parent aa7a333 commit 5fc083e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ module.exports = {
message: '\nWrite a SHORT, IMPERATIVE tense description of the change:\n',
validate: function(value) {
return !!value;
},
filter: function(value) {
return value.charAt(0).toLowerCase() + value.slice(1);
}
},
{
Expand Down
1 change: 1 addition & 0 deletions spec/czCustomizableSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('cz-customizable', function() {
expect(getQuestion(3).type).toEqual('input');
expect(getQuestion(3).message).toMatch(/IMPERATIVE tense description/);
expect(getQuestion(3).validate()).toEqual(false); //mandatory question
expect(getQuestion(3).filter('Subject')).toEqual('subject');

//question 4
expect(getQuestion(4).name).toEqual('body');
Expand Down

0 comments on commit 5fc083e

Please sign in to comment.