mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-17 23:28:04 +02:00
fix(install): harden Claude settings lifecycle
This commit is contained in:
@@ -8,6 +8,12 @@ const path = require('path');
|
||||
|
||||
const README = path.join(__dirname, '..', '..', 'README.md');
|
||||
const HOOKS_README = path.join(__dirname, '..', '..', 'hooks', 'README.md');
|
||||
const HOOK_REGISTRATION_PHRASE =
|
||||
'registers the resolved hook entries in `~/.claude/settings.json`';
|
||||
|
||||
function normalizeWhitespace(text) {
|
||||
return text.replace(/\s+/g, ' ');
|
||||
}
|
||||
|
||||
function test(name, fn) {
|
||||
try {
|
||||
@@ -44,11 +50,11 @@ function runTests() {
|
||||
'README should document the supported PowerShell hook install path'
|
||||
);
|
||||
assert.ok(
|
||||
readme.includes('%USERPROFILE%\\\\.claude'),
|
||||
readme.includes('%USERPROFILE%\\.claude'),
|
||||
'README should call out the correct Windows Claude config root'
|
||||
);
|
||||
assert.ok(
|
||||
readme.includes('registers the resolved\nhook entries in `~/.claude/settings.json`'),
|
||||
normalizeWhitespace(readme).includes(HOOK_REGISTRATION_PHRASE),
|
||||
'README should explain that manual installs register hooks in Claude settings'
|
||||
);
|
||||
})) passed++; else failed++;
|
||||
@@ -67,7 +73,7 @@ function runTests() {
|
||||
'hooks/README should document the supported PowerShell hook install path'
|
||||
);
|
||||
assert.ok(
|
||||
hooksReadme.includes('registers the resolved\nhook entries in `~/.claude/settings.json`'),
|
||||
normalizeWhitespace(hooksReadme).includes(HOOK_REGISTRATION_PHRASE),
|
||||
'hooks/README should explain that manual installs register hooks in Claude settings'
|
||||
);
|
||||
})) passed++; else failed++;
|
||||
|
||||
Reference in New Issue
Block a user