refactor: strip Phase/Plan/R-number references from source comments

This commit is contained in:
2026-05-13 09:51:45 +02:00
parent 075b729266
commit 17ae157365
66 changed files with 980 additions and 647 deletions

View File

@@ -1,6 +1,9 @@
import { describe, it, expect } from "vitest";
import { ZodError } from "zod";
import { getMediaUseCase, getMediaOutputSchema } from "@/application/use-cases/get-media.use-case";
import {
getMediaUseCase,
getMediaOutputSchema,
} from "@/application/use-cases/get-media.use-case";
import { MockMediaRepository } from "@/infrastructure/repositories/media.repository.mock";
import { MediaNotFoundError } from "@/entities/errors/media";
import { mediaFactory } from "@/__factories__/media.factory";
@@ -22,15 +25,17 @@ describe("getMediaUseCase", () => {
const repo = new MockMediaRepository();
const useCase = getMediaUseCase(repo);
await expect(useCase({ id: "missing" })).rejects.toThrow(MediaNotFoundError);
await expect(useCase({ id: "missing" })).rejects.toThrow(
MediaNotFoundError,
);
});
it("R25 — parses valid output without error", async () => {
it("parses valid output without error", async () => {
const validMedia = mediaFactory.build({ id: "m-r25" });
expect(() => getMediaOutputSchema.parse(validMedia)).not.toThrow();
});
it("R25 — throws ZodError when repository returns malformed media", async () => {
it("throws ZodError when repository returns malformed media", async () => {
const repo = new MockMediaRepository();
// Store a malformed object (missing required fields) via type cast
await repo._store({ id: "bad", alt: "alt", url: "u" } as never);

View File

@@ -1,6 +1,9 @@
import { describe, it, expect } from "vitest";
import { ZodError } from "zod";
import { listMediaUseCase, listMediaOutputSchema } from "@/application/use-cases/list-media.use-case";
import {
listMediaUseCase,
listMediaOutputSchema,
} from "@/application/use-cases/list-media.use-case";
import { MockMediaRepository } from "@/infrastructure/repositories/media.repository.mock";
import { mediaFactory } from "@/__factories__/media.factory";
@@ -33,12 +36,12 @@ describe("listMediaUseCase", () => {
expect(result).toHaveLength(2);
});
it("R25 — parses valid output without error", async () => {
it("parses valid output without error", async () => {
const items = [mediaFactory.build(), mediaFactory.build()];
expect(() => listMediaOutputSchema.parse(items)).not.toThrow();
});
it("R25 — throws ZodError when repository returns malformed items", async () => {
it("throws ZodError when repository returns malformed items", async () => {
const repo = new MockMediaRepository();
// Store a malformed object (missing required fields)
await repo._store({ id: "bad", alt: "alt", url: "u" } as never);