mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +01:00
14 lines
484 B
TypeScript
14 lines
484 B
TypeScript
|
|
import { describe, expect, it } from "vitest";
|
||
|
|
import options from "../services/options";
|
||
|
|
import { formatDateTime } from "./formatters";
|
||
|
|
|
||
|
|
describe("formatDateTime", () => {
|
||
|
|
it("tolerates incorrect locale", () => {
|
||
|
|
options.set("formattingLocale", "cn_TW");
|
||
|
|
|
||
|
|
expect(formatDateTime(new Date())).toBeTruthy();
|
||
|
|
expect(formatDateTime(new Date(), "full", "none")).toBeTruthy();
|
||
|
|
expect(formatDateTime(new Date(), "none", "full")).toBeTruthy();
|
||
|
|
});
|
||
|
|
});
|