mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-11 20:27:58 +02:00
fix(install): harden Claude settings lifecycle
This commit is contained in:
@@ -169,28 +169,18 @@ function runTests() {
|
||||
},
|
||||
}],
|
||||
}),
|
||||
/managedHooks.*non-empty unique id/
|
||||
);
|
||||
assert.throws(
|
||||
() => createInstallState({
|
||||
...baseOptions,
|
||||
operations: [{
|
||||
...operation,
|
||||
managedHooks: {
|
||||
SessionStart: [{
|
||||
id: 'duplicate',
|
||||
matcher: '.*',
|
||||
hooks: [{ type: 'command', command: 'node start.js' }],
|
||||
}],
|
||||
Stop: [{
|
||||
id: 'duplicate',
|
||||
hooks: [{ type: 'command', command: 'node stop.js' }],
|
||||
}],
|
||||
},
|
||||
}],
|
||||
}),
|
||||
/managedHooks.*globally unique id/
|
||||
/managedHooks.*Invalid hook entry/
|
||||
);
|
||||
assert.doesNotThrow(() => createInstallState({
|
||||
...baseOptions,
|
||||
operations: [{
|
||||
...operation,
|
||||
managedHooks: {
|
||||
SessionStart: [{ id: 'shared', hooks: [] }],
|
||||
LegacyEvent: [{ id: 'shared', hooks: [{ type: 'legacy' }] }],
|
||||
},
|
||||
}],
|
||||
}));
|
||||
})) passed++; else failed++;
|
||||
|
||||
if (test('writes and reads install-state from disk', () => {
|
||||
|
||||
Reference in New Issue
Block a user