This commit is contained in:
Andrew Pimenov 2026-09-10 11:40:49 +03:00 • committed by GitHub
commit 1ec981dcb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,7 @@ describe("datetime", () => {
const mockDateTimeFormat = vi.spyOn(Intl, "DateTimeFormat").mockImplementation(() => ({
formatToParts: mockFormatToParts,
}) as any);
}) as unknown as Intl.DateTimeFormat);
expect(detectDateOrder()).toBe("dmy");
mockDateTimeFormat.mockRestore();
@ -40,7 +40,7 @@ describe("datetime", () => {
const mockResolvedOptions = vi.fn().mockReturnValue({ timeZone: "America/Los_Angeles" });
const mockDateTimeFormat = vi.spyOn(Intl, "DateTimeFormat").mockImplementation(() => ({
resolvedOptions: mockResolvedOptions,
}) as any);
}) as unknown as Intl.DateTimeFormat);
expect(resolveZone(["local"])).toBe("America/Los_Angeles");
mockDateTimeFormat.mockRestore();