Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

Commit

Permalink
fix(scopes,test): Added test for allowing any scope value.
Browse files Browse the repository at this point in the history
Provides full code coverage to the new functionality.
  • Loading branch information
Garbee committed Jan 26, 2017
1 parent 3d21903 commit 3149921
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/validateMessage.test.js
Expand Up @@ -219,6 +219,19 @@ describe('validate-commit-msg.js', function() {
m.config.scope = undefined;
});

it('should allow any scope if "*" is defined', function() {
var msg = 'feat(anything): Fixed';

m.config.scope = {
validate: true
};

expect(m.validateMessage(msg)).to.equal(VALID);
expect(logs).to.deep.equal([]);

m.config.scope = undefined;
});

it('should allow empty scope', function() {
expect(m.validateMessage('fix: blablabla')).to.equal(VALID);
expect(errors).to.deep.equal([]);
Expand Down

0 comments on commit 3149921

Please sign in to comment.