@@ -17,23 +17,23 @@ describe('triggers', () => {
17
17
describe ( 'parseTriggers' , ( ) => {
18
18
19
19
it ( 'should parse single trigger' , ( ) => {
20
- var t = parseTriggers ( 'foo' ) ;
20
+ const t = parseTriggers ( 'foo' ) ;
21
21
22
22
expect ( t . length ) . toBe ( 1 ) ;
23
23
expect ( t [ 0 ] . open ) . toBe ( 'foo' ) ;
24
24
expect ( t [ 0 ] . close ) . toBe ( 'foo' ) ;
25
25
} ) ;
26
26
27
27
it ( 'should parse open:close form' , ( ) => {
28
- var t = parseTriggers ( 'foo:bar' ) ;
28
+ const t = parseTriggers ( 'foo:bar' ) ;
29
29
30
30
expect ( t . length ) . toBe ( 1 ) ;
31
31
expect ( t [ 0 ] . open ) . toBe ( 'foo' ) ;
32
32
expect ( t [ 0 ] . close ) . toBe ( 'bar' ) ;
33
33
} ) ;
34
34
35
35
it ( 'should parse multiple triggers' , ( ) => {
36
- var t = parseTriggers ( 'foo:bar bar:baz' ) ;
36
+ const t = parseTriggers ( 'foo:bar bar:baz' ) ;
37
37
38
38
expect ( t . length ) . toBe ( 2 ) ;
39
39
expect ( t [ 0 ] . open ) . toBe ( 'foo' ) ;
@@ -43,7 +43,7 @@ describe('triggers', () => {
43
43
} ) ;
44
44
45
45
it ( 'should parse multiple triggers with mixed forms' , ( ) => {
46
- var t = parseTriggers ( 'foo bar:baz' ) ;
46
+ const t = parseTriggers ( 'foo bar:baz' ) ;
47
47
48
48
expect ( t . length ) . toBe ( 2 ) ;
49
49
expect ( t [ 0 ] . open ) . toBe ( 'foo' ) ;
@@ -53,7 +53,7 @@ describe('triggers', () => {
53
53
} ) ;
54
54
55
55
it ( 'should properly trim excessive white-spaces' , ( ) => {
56
- var t = parseTriggers ( 'foo bar \n baz ' ) ;
56
+ const t = parseTriggers ( 'foo bar \n baz ' ) ;
57
57
58
58
expect ( t . length ) . toBe ( 3 ) ;
59
59
expect ( t [ 0 ] . open ) . toBe ( 'foo' ) ;
@@ -65,17 +65,17 @@ describe('triggers', () => {
65
65
} ) ;
66
66
67
67
it ( 'should lookup and translate special aliases' , ( ) => {
68
- var t = parseTriggers ( 'hover' ) ;
68
+ const t = parseTriggers ( 'hover' ) ;
69
69
70
70
expect ( t . length ) . toBe ( 1 ) ;
71
71
expect ( t [ 0 ] . open ) . toBe ( 'mouseenter' ) ;
72
72
expect ( t [ 0 ] . close ) . toBe ( 'mouseleave' ) ;
73
73
} ) ;
74
74
75
75
it ( 'should detect manual triggers' , ( ) => {
76
- var t = parseTriggers ( 'manual' ) ;
76
+ const t = parseTriggers ( 'manual' ) ;
77
77
78
- expect ( t [ 0 ] . isManual ) . toBeTruthy ( )
78
+ expect ( t [ 0 ] . isManual ) . toBeTruthy ( ) ;
79
79
} ) ;
80
80
81
81
it ( 'should ignore empty inputs' , ( ) => {
0 commit comments