-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathUtilsTest.res.mjs
More file actions
35 lines (27 loc) · 1.13 KB
/
UtilsTest.res.mjs
File metadata and controls
35 lines (27 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Test from "rescript-test/src/Test.res.mjs";
import * as Utils from "../src/Utils.res.mjs";
import * as Assert from "./Assert.res.mjs";
Test.test("parseValidDuration", (function () {
var duration = Utils.Duration.parseMillisInputToSeconds("00:12,000");
Assert.okEqual(undefined, duration, 12.0);
}));
Test.test("parseInvalidDuration", (function () {
var duration = Utils.Duration.parseMillisInputToSeconds("0012,000");
Assert.isErr(undefined, duration);
}));
Test.test("parseRoundedDuration", (function () {
var duration = Utils.Duration.parseMillisInputToSeconds("00:12,550");
Assert.okEqual(undefined, duration, 12.55);
}));
Test.test("formatDuration", (function () {
var duration = Utils.Duration.formatMillis(12.00);
Assert.stringEqual(undefined, duration, "00:12,000");
}));
Test.test("formatRoundedDuration", (function () {
var duration = Utils.Duration.formatMillis(12.55);
Assert.stringEqual(undefined, duration, "00:12,550");
}));
export {
}
/* Not a pure module */