ha-frontend-cdce8p/test-mocha/common/datetime/seconds_to_duration_test.ts
Paulus Schoutsen cdb2093ea6
Ts all the tests (#1998)
* Convert tests to TypeScript

* Add types for tests

* Rename files to TS

* Fix up test imports

* Fix TSC errors

* Liiiint

* Add types to util method signatures

* Some more types
2018-11-06 10:09:09 +01:00

13 lines
414 B
TypeScript

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