Files
clean-architecture-frontend…/tests/unit/feature-removal-argument.test.ts
T
DongHyeonkaandClaude Opus 5.5 ad0e83c867 fix(features): make feature add and removal work from the feature directory (09-07, 14-03)
A feature directory without feature-module.ts vanished silently, registry
consumers listed only the sample's directories, and the removal gate only knew
the sample. The generator now fails unless a NOT_INSTALLED marker says so
(D-10), consumer directories are globs over every feature, and the removal
script takes --feature=<id>. starter-experience.md documents the current
ownership declarations and the files a new feature touches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 23:10:19 +09:00

21 lines
714 B
TypeScript

import { spawnSync } from "node:child_process";
import { describe, expect, it } from "vitest";
// 09-07 (D-10). The removal gate takes the feature to remove as an argument
// instead of hard-coding the sample; an id no feature declares stops it before
// any fixture is built.
describe("feature removal argument", () => {
it("refuses a feature id that no installed feature declares", () => {
const run = spawnSync(
process.execPath,
["scripts/test-sample-removal.ts", "--feature=missing-feature"],
{ encoding: "utf8" },
);
expect(run.status).not.toBe(0);
expect(run.stderr).toMatch(
/No installed feature declares FEATURE_MODULE_ID "missing-feature"/u,
);
});
});