Skip to content

Commit

Permalink
clean up before creating PR
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhwile committed Dec 10, 2024
1 parent 258b863 commit 8610420
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 46 deletions.
1 change: 0 additions & 1 deletion src/impl/english.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ export function formatString(knownFormat) {
]),
key = stringify(filtered),
dateTimeHuge = "EEEE, LLLL d, yyyy, h:mm a";
console.log(key);
switch (key) {
case stringify(Formats.DATE_SHORT):
return "M/d/yyyy";
Expand Down
Empty file removed test/datetime/locale.test.js
Empty file.
46 changes: 1 addition & 45 deletions test/impl/english.test.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
/* global test expect */
import * as Formats from "../../src/impl/formats";
import {
formatRelativeTime,
formatString,
months,
monthsLong,
monthsNarrow,
monthsShort,
weekdays,
eras,
} from "../../src/impl/english";
import { formatRelativeTime, formatString, weekdays, eras } from "../../src/impl/english";

test("today", () => {
expect(formatRelativeTime("days", 0, "auto")).toBe("today");
Expand Down Expand Up @@ -89,41 +80,6 @@ test("1 hour ago", () => {
expect(formatRelativeTime("hours", -1, "always", true)).toBe("1 hr. ago");
});

test("months", () => {
expect(months("narrow")).toStrictEqual([...monthsNarrow]);
expect(months("short")).toStrictEqual([...monthsShort]);
expect(months("long")).toStrictEqual([...monthsLong]);
expect(months("numeric")).toStrictEqual([
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
]);
expect(months("2-digit")).toStrictEqual([
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
]);
expect(months("lets see default")).toBe(null);
});

test("formatString", () => {
expect(formatString(Formats.DATE_SHORT)).toBe("M/d/yyyy");
expect(formatString(Formats.DATE_MED)).toBe("LLL d, yyyy");
Expand Down

0 comments on commit 8610420

Please # to comment.