@@ -6,37 +6,37 @@ describe('crontime', function() {
6
6
it ( 'should test stars (* * * * * *)' , function ( ) {
7
7
expect ( function ( ) {
8
8
new cron . CronTime ( '* * * * * *' ) ;
9
- } ) . to . not . throw ;
9
+ } ) . to . not . throw ( Error ) ;
10
10
} ) ;
11
11
12
12
it ( 'should test digit (0 * * * * *)' , function ( ) {
13
13
expect ( function ( ) {
14
14
new cron . CronTime ( '0 * * * * *' ) ;
15
- } ) . to . not . throw ;
15
+ } ) . to . not . throw ( Error ) ;
16
16
} ) ;
17
17
18
18
it ( 'should test multi digits (08 * * * * *)' , function ( ) {
19
19
expect ( function ( ) {
20
20
new cron . CronTime ( '08 * * * * *' ) ;
21
- } ) . to . not . throw ;
21
+ } ) . to . not . throw ( Error ) ;
22
22
} ) ;
23
23
24
24
it ( 'should test all digits (08 8 8 8 8 5)' , function ( ) {
25
25
expect ( function ( ) {
26
26
new cron . CronTime ( '08 * * * * *' ) ;
27
- } ) . to . not . throw ;
27
+ } ) . to . not . throw ( Error ) ;
28
28
} ) ;
29
29
30
30
it ( 'should test too many digits (08 8 8 8 8 5)' , function ( ) {
31
31
expect ( function ( ) {
32
32
new cron . CronTime ( '08 * * * * *' ) ;
33
- } ) . to . not . throw ;
33
+ } ) . to . not . throw ( Error ) ;
34
34
} ) ;
35
35
36
36
it ( 'should test standard cron format (* * * * *)' , function ( ) {
37
37
expect ( function ( ) {
38
38
new cron . CronTime ( '* * * * *' ) ;
39
- } ) . to . not . throw ;
39
+ } ) . to . not . throw ( Error ) ;
40
40
} ) ;
41
41
42
42
it ( 'should test standard cron format (8 8 8 8 5)' , function ( ) {
@@ -55,69 +55,69 @@ describe('crontime', function() {
55
55
it ( 'should test hyphen (0-10 * * * * *)' , function ( ) {
56
56
expect ( function ( ) {
57
57
new cron . CronTime ( '0-10 * * * * *' ) ;
58
- } ) . to . not . throw ;
58
+ } ) . to . not . throw ( Error ) ;
59
59
} ) ;
60
60
61
61
it ( 'should test multi hyphens (0-10 0-10 * * * *)' , function ( ) {
62
62
expect ( function ( ) {
63
63
new cron . CronTime ( '0-10 0-10 * * * *' ) ;
64
- } ) . to . not . throw ;
64
+ } ) . to . not . throw ( Error ) ;
65
65
} ) ;
66
66
67
67
it ( 'should test all hyphens (0-10 0-10 0-10 0-10 0-10 0-1)' , function ( ) {
68
68
expect ( function ( ) {
69
69
new cron . CronTime ( '0-10 0-10 0-10 0-10 0-10 0-1' ) ;
70
- } ) . to . not . throw ;
70
+ } ) . to . not . throw ( Error ) ;
71
71
} ) ;
72
72
73
73
it ( 'should test comma (0,10 * * * * *)' , function ( ) {
74
74
expect ( function ( ) {
75
75
new cron . CronTime ( '0,10 * * * * *' ) ;
76
- } ) . to . not . throw ;
76
+ } ) . to . not . throw ( Error ) ;
77
77
} ) ;
78
78
79
79
it ( 'should test multi commas (0,10 0,10 * * * *)' , function ( ) {
80
80
expect ( function ( ) {
81
81
new cron . CronTime ( '0,10 0,10 * * * *' ) ;
82
- } ) . to . not . throw ;
82
+ } ) . to . not . throw ( Error ) ;
83
83
} ) ;
84
84
85
85
it ( 'should test all commas (0,10 0,10 0,10 0,10 0,10 0,1)' , function ( ) {
86
86
expect ( function ( ) {
87
87
new cron . CronTime ( '0,10 0,10 0,10 0,10 0,10 0,1' ) ;
88
- } ) . to . not . throw ;
88
+ } ) . to . not . throw ( Error ) ;
89
89
} ) ;
90
90
91
91
it ( 'should test alias (* * * * jan *)' , function ( ) {
92
92
expect ( function ( ) {
93
93
new cron . CronTime ( '* * * * jan *' ) ;
94
- } ) . to . not . throw ;
94
+ } ) . to . not . throw ( Error ) ;
95
95
} ) ;
96
96
97
97
it ( 'should test multi aliases (* * * * jan,feb *)' , function ( ) {
98
98
expect ( function ( ) {
99
99
new cron . CronTime ( '* * * * jan,feb *' ) ;
100
- } ) . to . not . throw ;
100
+ } ) . to . not . throw ( Error ) ;
101
101
} ) ;
102
102
103
103
it ( 'should test all aliases (* * * * jan,feb mon,tue)' , function ( ) {
104
104
expect ( function ( ) {
105
105
new cron . CronTime ( '* * * * jan,feb mon,tue' ) ;
106
- } ) . to . not . throw ;
106
+ } ) . to . not . throw ( Error ) ;
107
107
} ) ;
108
108
109
109
it ( 'should test every second monday (* * * * * mon/2)' ) ;
110
110
111
111
it ( 'should test unknown alias (* * * * jar *)' , function ( ) {
112
112
expect ( function ( ) {
113
113
new cron . CronTime ( '* * * * jar *' ) ;
114
- } ) . to . throw ;
114
+ } ) . to . throw ( Error ) ;
115
115
} ) ;
116
116
117
117
it ( 'should test unknown alias - short (* * * * j *)' , function ( ) {
118
118
expect ( function ( ) {
119
119
new cron . CronTime ( '* * * * j *' ) ;
120
- } ) . to . throw ;
120
+ } ) . to . throw ( Error ) ;
121
121
} ) ;
122
122
123
123
it ( 'should test Date' , function ( ) {
@@ -142,7 +142,7 @@ describe('crontime', function() {
142
142
it ( 'should test illegal repetition syntax' , function ( ) {
143
143
expect ( function ( ) {
144
144
new cron . CronTime ( '* * /4 * * *' ) ;
145
- } ) . to . throw ;
145
+ } ) . to . throw ( Error ) ;
146
146
} ) ;
147
147
148
148
it ( 'should test next date' , function ( ) {
@@ -180,18 +180,20 @@ describe('crontime', function() {
180
180
( function ( m ) {
181
181
expect ( function ( ) {
182
182
var ct = new cron . CronTime ( '0 0 0 33 ' + m + ' *' ) ;
183
- } ) . to . throw ;
183
+ } ) . to . throw ( Error ) ;
184
184
} ) ( ltm [ i ] ) ;
185
185
}
186
186
} ) ;
187
187
188
188
it ( 'should test next month selection' ) ;
189
189
190
190
describe ( 'should throw an exception because `L` not supported' , function ( ) {
191
+
191
192
it ( '(* * * L * *)' , function ( ) {
192
193
expect ( function ( ) {
193
194
new cron . CronTime ( '* * * L * *' ) ;
194
195
} ) . to . throw ( Error ) ;
196
+
195
197
} ) ;
196
198
197
199
it ( '(* * * * * L)' , function ( ) {
0 commit comments