fix(test): create commands/gsd/ dir before writing dev-preferences in test

Since #1540 migrated Claude Code to skills/ format, the installer may
not create commands/gsd/ anymore. The test needs to ensure the
directory exists before writing the user file into it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tibsfox
2026-04-02 05:49:24 -07:00
parent bdd41f961e
commit 11d5c0a4bd

View File

@@ -1390,7 +1390,9 @@ describe('Claude uninstall preserves user-generated files (#1423)', () => {
});
test('preserves dev-preferences.md across uninstall', () => {
const prefsPath = path.join(tmpDir, '.claude', 'commands', 'gsd', 'dev-preferences.md');
const prefsDir = path.join(tmpDir, '.claude', 'commands', 'gsd');
fs.mkdirSync(prefsDir, { recursive: true });
const prefsPath = path.join(prefsDir, 'dev-preferences.md');
const content = '---\nname: dev-preferences\n---\n# Preferences\nUse TypeScript strict.\n';
fs.writeFileSync(prefsPath, content);