Test fixes

pull/1054/head
Zef Hemel 2024-08-18 13:08:52 +02:00
parent 3ac21498f3
commit 8b811f11c9
2 changed files with 2 additions and 5 deletions

View File

@ -22,9 +22,6 @@ Deno.test("JSON utils", () => {
assertEquals(cleanupJSON({ a: [{ "a.b": 1 }] }), {
a: [{ a: { b: 1 } }],
});
assertEquals(
cleanupJSON(new Date("2023-05-13T12:30:00Z")),
"2023-05-13T12:30:00.000Z",
);
assertEquals(cleanupJSON(new Date("2023-05-03T00:00:00Z")), "2023-05-03");
});

View File

@ -60,7 +60,7 @@ export function cleanStringDate(d: Date): string {
String(d.getMonth() + 1).padStart(2, "0") + "-" +
String(d.getDate()).padStart(2, "0");
} else {
return localDateString(d);
return d.toISOString();
}
}