Files
clean-architecture-frontend…/tests/unit
DongHyeonka 8da33a5cf0 test(storage): 메모리 OPFS 파일 시스템을 테스트 helper로 옮긴다
문제: OPFS worker runtime을 메모리에서 돌리는 MemoryDirectory·MemoryFile이
tests/unit/opfs-worker-runtime.test.ts 안에만 있다. 05-04를 고치려면
recipe fake와 runtime에 같은 시나리오를 돌리는 parity 테스트가
tests/recipes에 필요한데, 그 테스트는 이 파일 시스템을 쓸 수 없다.
unit 테스트가 recipe를 import하면 optional-recipe 제거 드릴이 깨지므로
parity 테스트를 unit 쪽에 둘 수도 없다.

고른 방법: 그 블록(MemoryNode·MemoryFile·MemoryDirectory·fileHandle·
notFound)을 그대로 tests/helpers/memory-opfs.ts로 옮기고 export한다.
memory-indexeddb.ts와 같은 자리다. 코드는 바꾸지 않았다. helper는 src를
import하지 않아 browser-file-storage 제거 드릴에서도 남아도 된다.

위험·한계: 동작 변경 없음.

검증: opfs-worker-runtime.test.ts 82건 통과. check:types:test, 바꾼 파일
eslint 통과.

Refs: docs/reviews/2026-11-03-maturity-review/05-adapters-storage-kernel.md 05-04
2026-11-04 20:40:25 +09:00
..