test(fixtures): local-draft 샘플을 IndexedDB 소비자 fixture로 옮긴다

src/features/local-draft-feature는 기능이 아니라 IndexedDB recipe의
소비자다. 시험 5개와 recipe가 쓰고, 그래서 생성기에 NOT_A_FEATURE
예외가 있었다(S4 3.1절 S-3).

코드를 tests/fixtures/indexeddb-consumer/로 옮기고 import만 고쳤다.
NOT_A_FEATURE 표식은 이 폴더만 썼고 다운스트림 둘에도 없어 생성기에서
지웠다. 선언 없는 폴더는 밖으로 옮기라는 메시지로 실패한다. 매뉴얼
오류표, README, starter-experience, capability-consumer-experience,
patterns를 고쳤다.

위험: fixture는 기능 폴더 밖이라 기능 계층 규칙(dependency-cruiser)이
걸리지 않는다. recipe가 tests/ 아래 파일을 type import한다.

검증(desktop): test:contract, test:recipes, test:browser-capabilities,
test:unit 통과.
This commit is contained in:
DongHyeonka
2026-11-08 13:51:55 +09:00
parent e7210c71bf
commit b72cd7d4a7
19 changed files with 65 additions and 96 deletions
@@ -1,7 +1,7 @@
import type {
IndexedDbRuntimeDependencies,
} from "../../src/adapters/storage/indexeddb/indexeddb-types.ts";
import type { LocalDraft } from "../../src/features/local-draft-feature/domain/local-draft.ts";
import type { LocalDraft } from "../fixtures/indexeddb-consumer/domain/local-draft.ts";
import {
expect,
test,
@@ -21,7 +21,7 @@ test("composes the local-draft feature over the real browser IndexedDB runtime",
const contributionModulePath =
"/src/features/feature-adapter-contribution.ts";
const localDraftModulePath =
"/src/features/local-draft-feature/adapters/create-local-draft-feature-input.ts";
"/tests/fixtures/indexeddb-consumer/adapters/create-local-draft-feature-input.ts";
const {
createIndexedDbRuntime,
@@ -39,7 +39,7 @@ test("composes the local-draft feature over the real browser IndexedDB runtime",
LOCAL_DRAFT_FEATURE_ADAPTER_CONTRIBUTION,
} = (await import(
/* @vite-ignore */ localDraftModulePath
)) as typeof import("../../src/features/local-draft-feature/adapters/create-local-draft-feature-input.ts");
)) as typeof import("../fixtures/indexeddb-consumer/adapters/create-local-draft-feature-input.ts");
const suffix = crypto.randomUUID().replaceAll("-", "");
const scope = Object.freeze({