* Add timer card and badge * Disable interval on disconnect * Tests! * One more test case * Remove padStart * Remove state from timer state card
13 lines
412 B
JavaScript
13 lines
412 B
JavaScript
import { assert } from 'chai';
|
|
|
|
import secondsToDuration from '../../../js/common/util/seconds_to_duration.js';
|
|
|
|
describe('secondsToDuration', () => {
|
|
it('works', () => {
|
|
assert.strictEqual(secondsToDuration(0), null);
|
|
assert.strictEqual(secondsToDuration(65), '1:05');
|
|
assert.strictEqual(secondsToDuration(3665), '1:01:05');
|
|
assert.strictEqual(secondsToDuration(39665), '11:01:05');
|
|
});
|
|
});
|