Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sho-ki committed May 16, 2024
1 parent d35be5a commit f8ae891
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/datetime/tokenParse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ test("DateTime.fromFormat() throws if you specify meridiem with 24-hour time", (
expect(() => DateTime.fromFormat("930PM", "Hmma")).toThrow(ConflictingSpecificationError);
});

test("DateTime.fromFormat() throws if h is used with 24-hour time", () => {
expect(() => DateTime.fromFormat("18:30 AM", "h:mm a")).toThrowError(
ConflictingSpecificationError
);
});

// #714
test("DateTime.fromFormat() makes dots optional and handles non breakable spaces", () => {
function parseMeridiem(input, isAM) {
Expand Down

0 comments on commit f8ae891

Please sign in to comment.