From 51a86026763d09596d43620e2dc5595bcf243dd8 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Sun, 15 Mar 2026 17:27:06 -0600 Subject: [PATCH] fix(test): update git.isolation test to match #536 behavior change #536 changed git.isolation from deprecated to an active setting. Update the test to verify it passes through correctly instead of expecting a deprecation warning. Add separate test for the still- deprecated git.merge_to_main. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../gsd/tests/preferences-schema-validation.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/resources/extensions/gsd/tests/preferences-schema-validation.test.ts b/src/resources/extensions/gsd/tests/preferences-schema-validation.test.ts index c79e82282..81a57a88c 100644 --- a/src/resources/extensions/gsd/tests/preferences-schema-validation.test.ts +++ b/src/resources/extensions/gsd/tests/preferences-schema-validation.test.ts @@ -155,12 +155,19 @@ async function main(): Promise { console.log("\n=== existing behavior preserved ==="); - // Ensure deprecated git fields still produce deprecation warnings (not unknown-key warnings) + // git.isolation is a valid active setting (worktree | branch) — no warnings or errors { - const { warnings } = validatePreferences({ git: { isolation: "worktree" } } as GSDPreferences); - assertTrue(warnings.some(w => w.includes("deprecated")), "deprecated git.isolation still warns"); + const { warnings, errors, preferences } = validatePreferences({ git: { isolation: "worktree" } } as GSDPreferences); const unknownWarnings = warnings.filter(w => w.includes("unknown")); assertEq(unknownWarnings.length, 0, "git is a known key — no unknown-key warning"); + assertEq(errors.length, 0, "valid git.isolation produces no errors"); + assertEq(preferences.git?.isolation, "worktree", "git.isolation value passes through"); + } + + // git.merge_to_main is deprecated — still produces deprecation warning + { + const { warnings } = validatePreferences({ git: { merge_to_main: true } } as GSDPreferences); + assertTrue(warnings.some(w => w.includes("deprecated")), "deprecated git.merge_to_main still warns"); } report();