Skip to content

Commit

Permalink
Add another test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Dec 19, 2022
1 parent 2ba5fa6 commit f764869
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/exporter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}]);
});
});

0 comments on commit f764869

Please sign in to comment.