fix(features): address Task 3 code review feedback

- Add navItemFactory to navigation (spec §5.1 — was missing)
- Refactor blog/router.test.ts to use articleFactory (eliminate new Date())
- headerFactory uses sequence for logoId (deterministic buildList output)
- Align media/tsconfig.json with other features (jsx + tests/ include)
- Refactor auth/container.test.ts to use userFactory

Reviewer: superpowers:code-reviewer (Task 3 of Plan 7).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-05 15:18:35 +02:00
parent 53c2fbb9e1
commit a74f217703
8 changed files with 57 additions and 19 deletions

View File

@@ -4,6 +4,7 @@ import { BLOG_SYMBOLS } from "../../di/symbols";
import { MockArticlesRepository } from "../../infrastructure/repositories/mock-articles.repository";
import type { IArticlesRepository } from "../../application/repositories/articles-repository.interface";
import { blogRouter } from "./router";
import { articleFactory } from "../../__factories__/article.factory.js";
describe("blogRouter", () => {
let repo: MockArticlesRepository;
@@ -26,17 +27,9 @@ describe("blogRouter", () => {
});
it("articleBySlug returns the article when present", async () => {
const now = new Date();
await repo.createArticle({
id: "1",
title: "T",
slug: "t",
content: null,
status: "draft",
authorId: "u1",
createdAt: now,
updatedAt: now,
});
await repo.createArticle(
articleFactory.build({ id: "1", title: "T", slug: "t", authorId: "u1" }),
);
const caller = blogRouter.createCaller({});
const result = await caller.articleBySlug({ slug: "t" });