File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export const linefeed = createInput('\\n')
46
46
export const carriageReturn = createInput ( '\\r' )
47
47
48
48
export const not = {
49
+ word : createInput ( '\\W+' ) ,
49
50
wordChar : createInput ( '\\W' ) ,
50
51
wordBoundary : createInput ( '\\B' ) ,
51
52
digit : createInput ( '\\D' ) ,
Original file line number Diff line number Diff line change @@ -146,6 +146,8 @@ describe('inputs', () => {
146
146
expectTypeOf ( extractRegExp ( input ) ) . toEqualTypeOf < '\\r' > ( )
147
147
} )
148
148
it ( 'not' , ( ) => {
149
+ expect ( not . word . toString ( ) ) . toMatchInlineSnapshot ( '"\\\\W+"' )
150
+ expectTypeOf ( extractRegExp ( not . word ) ) . toEqualTypeOf < '\\W+' > ( )
149
151
expect ( not . wordChar . toString ( ) ) . toMatchInlineSnapshot ( '"\\\\W"' )
150
152
expectTypeOf ( extractRegExp ( not . wordChar ) ) . toEqualTypeOf < '\\W' > ( )
151
153
expect ( not . wordBoundary . toString ( ) ) . toMatchInlineSnapshot ( '"\\\\B"' )
You can’t perform that action at this time.
0 commit comments