feat: group all-account rows by instrument and day (WealthLedger/main#47) (#126)
This commit was merged in pull request #126.
This commit is contained in:
@@ -3,6 +3,7 @@ import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
formatDate,
|
||||
formatMoney,
|
||||
formatSnapshotDay,
|
||||
formatSnapshotTime,
|
||||
instrumentLogoUrl,
|
||||
} from "./display";
|
||||
@@ -22,6 +23,10 @@ describe("shared display helpers", () => {
|
||||
}).format(new Date(instant));
|
||||
|
||||
expect(formatSnapshotTime(instant)).toBe(expected);
|
||||
expect(formatSnapshotDay(instant)).toBe(
|
||||
new Intl.DateTimeFormat("ru-RU", { dateStyle: "short" })
|
||||
.format(new Date(instant)),
|
||||
);
|
||||
});
|
||||
it("formats decimal strings without financial arithmetic", () => {
|
||||
expect(formatMoney({ currency: "RUB", value: "-1234567.89" })).toBe(
|
||||
|
||||
Reference in New Issue
Block a user