1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00
Files
frontend/test-mocha/common/datetime/seconds_to_duration_test.js
Paulus Schoutsen 912969111f Move all of hassUtil to JS (#1153)
* Move all of hassUtil to JS

* Fix tests
2018-05-09 21:33:31 -04:00

13 lines
416 B
JavaScript

import { assert } from 'chai';
import secondsToDuration from '../../../js/common/datetime/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');
});
});