File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1220,6 +1220,16 @@ describe('ignoreCase flag', () => {
1220
1220
expect ( ( ) => compile ( { a : / f o o / , b : / b a r / i, c : "quxx" } ) ) . toThrow ( "If one rule is /i then all must be" )
1221
1221
} )
1222
1222
1223
+ test ( "allows all rules to be /ui" , ( ) => {
1224
+ expect ( ( ) => compile ( { a : / f o o / ui, b : / b a r / ui, c : "quxx" } ) ) . not . toThrow ( )
1225
+ expect ( ( ) => compile ( { a : / f o o / u, b : / b a r / i, c : "quxx" } ) ) . toThrow ( "If one rule is /i then all must be" )
1226
+ expect ( ( ) => compile ( { a : / f o o / i, b : / b a r / u, c : "quxx" } ) ) . toThrow ( "If one rule is /i then all must be" )
1227
+ expect ( ( ) => compile ( { a : / f o o / ui, b : / b a r / i, c : "quxx" } ) ) . toThrow ( "If one rule is /u then all must be" )
1228
+ expect ( ( ) => compile ( { a : / f o o / ui, b : / b a r / u, c : "quxx" } ) ) . toThrow ( "If one rule is /i then all must be" )
1229
+ expect ( ( ) => compile ( { a : / f o o / i, b : / b a r / ui, c : "quxx" } ) ) . toThrow ( "If one rule is /u then all must be" )
1230
+ expect ( ( ) => compile ( { a : / f o o / u, b : / b a r / ui, c : "quxx" } ) ) . toThrow ( "If one rule is /i then all must be" )
1231
+ } )
1232
+
1223
1233
test ( "supports ignoreCase" , ( ) => {
1224
1234
const lexer = compile ( { a : / f o o / i, b : / b a r / i, c : "quxx" } )
1225
1235
lexer . reset ( "FoObArQuXx" )
You can’t perform that action at this time.
0 commit comments