Skip to content

Commit af6ee22

Browse files
Updated tests
1 parent 00c5c56 commit af6ee22

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

tests/unit/utils/tasks.spec.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)