From f764869cc89db39c1240ba1f7b9710a7d74ee83d Mon Sep 17 00:00:00 2001 From: Ajay Date: Mon, 19 Dec 2022 16:19:01 -0500 Subject: [PATCH] Add another test case --- test/exporter.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/exporter.test.ts b/test/exporter.test.ts index bf948df0..596af640 100644 --- a/test/exporter.test.ts +++ b/test/exporter.test.ts @@ -291,4 +291,20 @@ describe("Import segments", () => { category: "chapter" as Category }]); }); + + it ("((Some name) 1:20)", () => { + const input = ` ((Some name) 1:20) + ((Some other name) 1:25)`; + + const result = importTimes(input, 8000); + expect(result).toMatchObject([{ + segment: [80, 85], + description: "Some name", + category: "chapter" as Category + }, { + segment: [85, 8000], + description: "Some other name", + category: "chapter" as Category + }]); + }); }); \ No newline at end of file