@@ -7,42 +7,42 @@ describe('utils', () => {
7
7
const regExp = createRegExpForWords ( [ 'add' ] ) ! ;
8
8
9
9
it ( 'should match action literals' , ( ) => {
10
- expect ( `"ADD"` ) . to . match ( regExp ) ;
11
- expect ( `"ADD_SOMETHING"` ) . to . match ( regExp ) ;
12
- expect ( `"SOMETHING_ADD"` ) . to . match ( regExp ) ;
10
+ expect ( `"ADD"` ) . toMatch ( regExp ) ;
11
+ expect ( `"ADD_SOMETHING"` ) . toMatch ( regExp ) ;
12
+ expect ( `"SOMETHING_ADD"` ) . toMatch ( regExp ) ;
13
13
14
- expect ( `'ADD'` ) . to . match ( regExp ) ;
15
- expect ( `'ADD_SOMETHING'` ) . to . match ( regExp ) ;
16
- expect ( `'SOMETHING_ADD'` ) . to . match ( regExp ) ;
14
+ expect ( `'ADD'` ) . toMatch ( regExp ) ;
15
+ expect ( `'ADD_SOMETHING'` ) . toMatch ( regExp ) ;
16
+ expect ( `'SOMETHING_ADD'` ) . toMatch ( regExp ) ;
17
17
18
- expect ( '`ADD`' ) . to . match ( regExp ) ;
19
- expect ( '`ADD_SOMETHING`' ) . to . match ( regExp ) ;
20
- expect ( '`SOMETHING_ADD`' ) . to . match ( regExp ) ;
18
+ expect ( '`ADD`' ) . toMatch ( regExp ) ;
19
+ expect ( '`ADD_SOMETHING`' ) . toMatch ( regExp ) ;
20
+ expect ( '`SOMETHING_ADD`' ) . toMatch ( regExp ) ;
21
21
} ) ;
22
22
23
23
it ( 'should match action symbols' , ( ) => {
24
- expect ( 'ADD' ) . to . match ( regExp ) ;
25
- expect ( 'ADD_SOMETHING' ) . to . match ( regExp ) ;
26
- expect ( 'SOMETHING_ADD' ) . to . match ( regExp ) ;
24
+ expect ( 'ADD' ) . toMatch ( regExp ) ;
25
+ expect ( 'ADD_SOMETHING' ) . toMatch ( regExp ) ;
26
+ expect ( 'SOMETHING_ADD' ) . toMatch ( regExp ) ;
27
27
28
- expect ( decamelize ( 'Add' ) ) . to . match ( regExp ) ;
29
- expect ( decamelize ( 'AddSomething' ) ) . to . match ( regExp ) ;
30
- expect ( decamelize ( 'SomethingAdd' ) ) . to . match ( regExp ) ;
28
+ expect ( decamelize ( 'Add' ) ) . toMatch ( regExp ) ;
29
+ expect ( decamelize ( 'AddSomething' ) ) . toMatch ( regExp ) ;
30
+ expect ( decamelize ( 'SomethingAdd' ) ) . toMatch ( regExp ) ;
31
31
} ) ;
32
32
33
33
it ( 'should not match words within larger words' , ( ) => {
34
- expect ( 'READD' ) . to . not . match ( regExp ) ;
35
- expect ( 'Readd' ) . to . not . match ( regExp ) ;
34
+ expect ( 'READD' ) . not . toMatch ( regExp ) ;
35
+ expect ( 'Readd' ) . not . toMatch ( regExp ) ;
36
36
37
- expect ( 'ADDER' ) . to . not . match ( regExp ) ;
38
- expect ( 'Adder' ) . to . not . match ( regExp ) ;
37
+ expect ( 'ADDER' ) . not . toMatch ( regExp ) ;
38
+ expect ( 'Adder' ) . not . toMatch ( regExp ) ;
39
39
40
- expect ( 'LADDER' ) . to . not . match ( regExp ) ;
41
- expect ( 'Ladder' ) . to . not . match ( regExp ) ;
40
+ expect ( 'LADDER' ) . not . toMatch ( regExp ) ;
41
+ expect ( 'Ladder' ) . not . toMatch ( regExp ) ;
42
42
} ) ;
43
43
44
44
it ( 'should create a RegExp from a string' , ( ) => {
45
- expect ( createRegExpForWords ( '.' ) ?. toString ( ) ) . to . equal ( '/./i' ) ;
45
+ expect ( createRegExpForWords ( '.' ) ?. toString ( ) ) . toEqual ( '/./i' ) ;
46
46
} ) ;
47
47
} ) ;
48
48
} ) ;
0 commit comments