Skip to content

Commit

Permalink
test(TikJSTime): Remove test cases due format does not throw anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
nascjoao committed Aug 19, 2024
1 parent 7b37306 commit 3009842
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/TikJSTime/tests/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@ describe("TikJSTime — format", () => {
expect(formattedTime).toBe("00:10:00");
});

it("should throw an error if the format string is empty", () => {
const time = new TikJSTime(600);
expect(() => time.format("")).toThrow(
'The time pattern "" must contain at least one of the following blocks: "h", "hh", "m", "mm", "s" or "ss".',
);
});

it("should throw an error if the format string has no blocks", () => {
const time = new TikJSTime(600);
expect(() => time.format("abc")).toThrow(
'The time pattern "abc" must contain at least one of the following blocks: "h", "hh", "m", "mm", "s" or "ss".',
);
});

it("should escape blocks with square brackets", () => {
const time = new TikJSTime(601);
const formattedTime = time.format("Ti[m]e: mm:ss");
Expand Down

0 comments on commit 3009842

Please sign in to comment.