@@ -163,22 +163,21 @@ describe('tasks', () => {
163163 it ( 'should format seconds to nice isodatetime format' , ( ) => {
164164 expect ( formatDuration ( null ) ) . to . equal ( undefined )
165165 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' )
170170 } )
171171 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 )
173173 } )
174174 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' )
177177 } )
178178 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' )
182181 } )
183182 } )
184183
0 commit comments