feat: add stock pages and ticker navigation
Add stock search and detail pages with charts, dividends and shared event rows. Use verified ticker links for portfolio names and logos, numeric dates and refreshed account cards. Update the generated API contract.
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { formatMoney, instrumentLogoUrl } from "./display";
|
||||
import {
|
||||
formatDate,
|
||||
formatMoney,
|
||||
formatSnapshotTime,
|
||||
instrumentLogoUrl,
|
||||
} from "./display";
|
||||
|
||||
describe("shared display helpers", () => {
|
||||
it("uses padded Russian dates and preserves the UTC date of timestamps", () => {
|
||||
expect(formatDate("2027-09-10")).toBe("10.09.2027");
|
||||
expect(formatDate("2024-02-29")).toBe("29.02.2024");
|
||||
expect(formatDate("2027-09-10T00:30:00+03:00")).toBe("09.09.2027");
|
||||
expect(formatSnapshotTime("2027-09-10T00:30:00+03:00")).toBe(
|
||||
"09.09.2027, 21:30",
|
||||
);
|
||||
});
|
||||
it("formats decimal strings without financial arithmetic", () => {
|
||||
expect(formatMoney({ value: "-1234567.89", currency: "RUB" })).toBe(
|
||||
"-1 234 567,89 ₽",
|
||||
|
||||
Reference in New Issue
Block a user