refactor: enforce frontend view model boundaries
This commit is contained in:
@@ -62,6 +62,7 @@ describe("AppRoutes", () => {
|
||||
server.use(
|
||||
http.post("*/api/v1/auth/login", async ({ request }) => {
|
||||
credentials = await request.json();
|
||||
|
||||
return HttpResponse.json({
|
||||
accessToken: "login-token",
|
||||
user: { email: "user@example.com", id: "user-1" },
|
||||
@@ -103,7 +104,8 @@ describe("AppRoutes", () => {
|
||||
),
|
||||
http.get("*/api/v1/bank-cards", () => HttpResponse.json([])),
|
||||
http.get("*/api/v1/bank-cards/summary", () =>
|
||||
HttpResponse.json((/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
HttpResponse.json(
|
||||
{
|
||||
cardId: null,
|
||||
categories: [],
|
||||
@@ -111,8 +113,9 @@ describe("AppRoutes", () => {
|
||||
month: "2026-08",
|
||||
net: { currency: "RUB", value: "0" },
|
||||
refunds: { currency: "RUB", value: "0" },
|
||||
}
|
||||
/* eslint-enable unicorn/no-null */)),
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
),
|
||||
);
|
||||
renderRoutes("/cards?month=2026-08");
|
||||
|
||||
Reference in New Issue
Block a user