fix: honor --dry-run in update and uninstall
This commit is contained in:
parent
6229538d29
commit
744cb36d74
9 changed files with 113 additions and 23 deletions
|
|
@ -56,6 +56,21 @@ test("claude-code: 설치 → 드리프트 없음 → 제거", async () => {
|
|||
await assert.rejects(() => fs.access(plan.root));
|
||||
});
|
||||
|
||||
test("removeInstall dryRun 은 파일과 매니페스트를 건드리지 않는다", async () => {
|
||||
const plan = await planInstall("claude-code", "user", skill, env);
|
||||
const res = await applyPlan(plan, skill.version, { env });
|
||||
|
||||
const dry = await removeInstall(res.record, { env, dryRun: true });
|
||||
assert.equal(dry.removed.length, 3);
|
||||
assert.equal(dry.keptModified.length, 0);
|
||||
await fs.access(path.join(plan.root, "SKILL.md"));
|
||||
assert.equal((await readManifest(home)).installs.length, 1);
|
||||
|
||||
const real = await removeInstall(res.record, { env });
|
||||
assert.equal(real.removed.length, 3);
|
||||
assert.equal((await readManifest(home)).installs.length, 0);
|
||||
});
|
||||
|
||||
test("사용자가 고친 파일은 update 가 건너뛴다", async () => {
|
||||
const plan = await planInstall("claude-code", "user", skill, env);
|
||||
const first = await applyPlan(plan, skill.version, { env });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue