diff --git a/validate-commit-msg.js b/validate-commit-msg.js index 7235b8d9f8f0..dad507d14953 100755 --- a/validate-commit-msg.js +++ b/validate-commit-msg.js @@ -13,7 +13,7 @@ var util = require('util'); var MAX_LENGTH = 70; -var PATTERN = /^(\w*)(\(([\w\$\.\-\*]*)\))?\: (.*)$/; +var PATTERN = /^(\w*)(\(([\w\$\.\-\*/]*)\))?\: (.*)$/; var IGNORED = /^WIP\:/; var TYPES = { feat: true, diff --git a/validate-commit-msg.spec.js b/validate-commit-msg.spec.js index 2ea3cf16276a..7483a9b03de4 100644 --- a/validate-commit-msg.spec.js +++ b/validate-commit-msg.spec.js @@ -31,6 +31,7 @@ describe('validate-commit-msg.js', function() { expect(m.validateMessage('chore($controller): something')).toBe(VALID); expect(m.validateMessage('chore(foo-bar): something')).toBe(VALID); expect(m.validateMessage('chore(*): something')).toBe(VALID); + expect(m.validateMessage('chore(guide/location): something')).toBe(VALID); expect(errors).toEqual([]); });