From 8f33dd8ea4907d5f20ca55e5a4c6b82ad9604fa6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 27 Sep 2024 16:39:49 +0200 Subject: [PATCH] find a bug --- src/tests/utils/time.test.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/tests/utils/time.test.ts b/src/tests/utils/time.test.ts index 67140e9..8d869bc 100644 --- a/src/tests/utils/time.test.ts +++ b/src/tests/utils/time.test.ts @@ -1,4 +1,4 @@ -import { showDate } from "../../utils/time"; +import { showDate, strToSeconds } from "../../utils/time"; describe("Date with correct timezone", () => { const map = new Map([["u_time_at", "@"]]); @@ -31,20 +31,18 @@ describe("Date with correct timezone", () => { } }); -/* describe("String time to seconds", () => { +describe("String time to seconds", () => { { const name = "10m30"; test(name, () => { expect(strToSeconds(name)).toBe(630); }); } -}); */ - -/* describe("Time delta", () => { { - const name = 1312; - test(name.toString(), () => { - expect(timeDeltaToString(name)).toBe("0 secs"); + // todo: see https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/issues/183 + const name = "12h30"; + test(name, () => { + /* expect(strToSeconds(name)).toBe(45000); */ }); } -}); */ +});