feat: add TechLog feature contracts

This commit is contained in:
DongHyeonka
2026-08-15 18:07:12 +09:00
parent 5479101c8c
commit 01ed1e9300
9 changed files with 2787 additions and 0 deletions
@@ -0,0 +1,33 @@
import { describe, expect, it } from "vitest";
import type { ApplicationFeatureInputs } from "../../../src/application/ports/in/application-api.ts";
import {
TECH_LOG_FEATURE_ID,
type TechLogFeatureInput,
} from "../../../src/features/tech-log/application/tech-log-feature-input.ts";
import type { PublicContentQueries } from "../../../src/features/tech-log/application/ports/public-content-queries.ts";
import type { StudioGateway } from "../../../src/features/tech-log/application/ports/studio-gateway.ts";
function acceptsApplicationFeatureInput(
input: ApplicationFeatureInputs["tech-log"],
): TechLogFeatureInput {
return input;
}
describe("TechLog feature input", () => {
it("uses the fixed application feature identifier", () => {
expect(TECH_LOG_FEATURE_ID).toBe("tech-log");
});
it("accepts public queries and a Studio gateway factory through the application registry", () => {
const publicContent = {} as PublicContentQueries;
const gateway = {} as StudioGateway;
const input = acceptsApplicationFeatureInput({
publicContent,
createStudioGateway: () => gateway,
});
expect(input.publicContent).toBe(publicContent);
expect(input.createStudioGateway()).toBe(gateway);
});
});