@@ -163,22 +163,21 @@ describe('tasks', () => {
163
163
it ( 'should format seconds to nice isodatetime format' , ( ) => {
164
164
expect ( formatDuration ( null ) ) . to . equal ( undefined )
165
165
expect ( formatDuration ( undefined ) ) . to . equal ( undefined )
166
- expect ( formatDuration ( 42 ) ) . to . equal ( '00:00:42' )
167
- expect ( formatDuration ( 84 ) ) . to . equal ( '00:01:24' )
168
- expect ( formatDuration ( 4242 ) ) . to . equal ( '01:10:42' )
169
- expect ( formatDuration ( 1426332 ) ) . to . equal ( '16d 12:12:12' )
166
+ expect ( formatDuration ( 42 , false , 'run' ) ) . to . equal ( '00:00:42' )
167
+ expect ( formatDuration ( 84 , false , 'run' ) ) . to . equal ( '00:01:24' )
168
+ expect ( formatDuration ( 4242 , false , 'run' ) ) . to . equal ( '01:10:42' )
169
+ expect ( formatDuration ( 1426332 , false , 'run' ) ) . to . equal ( '16d 12:12:12' )
170
170
} )
171
171
it ( 'should return undefined for 0 seconds by default' , ( ) => {
172
- expect ( formatDuration ( 0 ) ) . to . equal ( undefined )
172
+ expect ( formatDuration ( 0 , false , 'run' ) ) . to . equal ( undefined )
173
173
} )
174
174
it ( 'should change format of 0 seconds based on value of allowZeros' , ( ) => {
175
- expect ( formatDuration ( 0 , false ) ) . to . equal ( undefined )
176
- expect ( formatDuration ( 0 , true ) ) . to . equal ( '00:00:00' )
175
+ expect ( formatDuration ( 0 , false , 'run' ) ) . to . equal ( undefined )
176
+ expect ( formatDuration ( 0 , true , 'run' ) ) . to . equal ( '00:00:00' )
177
177
} )
178
178
it ( 'should not change format of non-zero values based on allowZeros' , ( ) => {
179
- expect ( formatDuration ( 42 ) ) . to . equal ( '00:00:42' )
180
- expect ( formatDuration ( 42 , false ) ) . to . equal ( '00:00:42' )
181
- expect ( formatDuration ( 42 , true ) ) . to . equal ( '00:00:42' )
179
+ expect ( formatDuration ( 42 , false , 'run' ) ) . to . equal ( '00:00:42' )
180
+ expect ( formatDuration ( 42 , true , 'run' ) ) . to . equal ( '00:00:42' )
182
181
} )
183
182
} )
184
183
0 commit comments