mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 10:18:14 +00:00
fix(recovery): harden shared commands startup recovery
This commit is contained in:
1 parent
894a8ea15f
commit
103f0547c9
3 files changed
+209
-2
No files matched your search
@@ -231,6 +231,14 @@ describe('web-server shared-routes', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('returns an empty command list when shared commands directory is missing', async () => {
|
||||
const payload = await getJson<{
|
||||
items: Array<{ name: string; type: string; description: string; path: string }>;
|
||||
}>(baseUrl, '/api/shared/commands');
|
||||
|
||||
expect(payload.items).toEqual([]);
|
||||
});
|
||||
|
||||
it('returns full content for a shared command markdown file', async () => {
|
||||
const commandsDir = path.join(ccsDir, 'shared', 'commands');
|
||||
fs.mkdirSync(commandsDir, { recursive: true });
|
||||
|
||||
Reference in new issue
Block a user