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:
@@ -1390,7 +1390,9 @@ describe('Claude uninstall preserves user-generated files (#1423)', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('preserves dev-preferences.md across uninstall', () => {
|
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';
|
const content = '---\nname: dev-preferences\n---\n# Preferences\nUse TypeScript strict.\n';
|
||||||
fs.writeFileSync(prefsPath, content);
|
fs.writeFileSync(prefsPath, content);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user