@@ -12,6 +12,8 @@ describe("validate", () => {
1212 "[Bugfix:SubminiPolls] xxxx" ,
1313 "[Feature:HelpQueue] xxxx" ,
1414 "[SYSADMIN ACTION][Refactor:Autograding] xxxx" ,
15+ "[SECURITY][Bugfix:Submission] Some security hole" ,
16+ "[SYSADMIN ACTION][SECURITY][Bugfix:Submission] xxxx" ,
1517 "[DevDependency] xxxx" ,
1618 "[Dependency] xxxx" ,
1719 "[Bugfix:Submission] 0123456789012345678901234567890123456789" ,
@@ -34,6 +36,30 @@ describe("validate", () => {
3436 "[SYSADMINACTION][Refactor:Autograding] xxxx" ,
3537 "Invalid title format, must start with [<TYPE>:<MODULE>] and have space before description." ,
3638 ] ,
39+ [
40+ "[SYSADMIN ACTION] [Refactor:Submission] test" ,
41+ "There should not be a space following [SYSADMIN ACTION]." ,
42+ ] ,
43+ [
44+ "[SYSADMIN ACTION][Refactor:Autograding]foo" ,
45+ "Invalid title format, must start with [SYSADMIN ACTION][<TYPE>:<MODULE>] and have space before description." ,
46+ ] ,
47+ [
48+ "[SECURITY] [Refactor:Submission] test" ,
49+ "There should not be a space following [SECURITY]." ,
50+ ] ,
51+ [
52+ "[SECURITY][Refactor:Autograding]foo" ,
53+ "Invalid title format, must start with [SECURITY][<TYPE>:<MODULE>] and have space before description." ,
54+ ] ,
55+ [
56+ "[SYSADMIN ACTION][SECURITY][Refactor:Autograding]foo" ,
57+ "Invalid title format, must start with [SYSADMIN ACTION][SECURITY][<TYPE>:<MODULE>] and have space before description." ,
58+ ] ,
59+ [
60+ "[SECURITY][SYSADMIN ACTION][Refactor:Autograding] foo" ,
61+ "Invalid title format, must start with [SECURITY][<TYPE>:<MODULE>] and have space before description." ,
62+ ] ,
3763 ] . forEach ( ( [ value , expectedException ] ) => {
3864 it ( `checkTitle should throw: ${ value } ` , ( ) => {
3965 expect ( ( ) => checkTitle ( value ) ) . to . throw ( expectedException ) ;
0 commit comments