mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 16:25:51 +00:00
feat: 添加云端管理命令(memory-stores、vault、schedule、skill-store、agents-platform)
- /memory-stores: 远程记忆存储管理 - /vault: 密钥保险库管理 - /schedule: 云端定时触发器管理(cron) - /skill-store: 技能商店浏览和安装 - /agents-platform: 远程 agent 调度管理 Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
This commit is contained in:
44
src/commands/skill-store/__tests__/index.test.ts
Normal file
44
src/commands/skill-store/__tests__/index.test.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Unit tests for the skill-store command definition (index.tsx)
|
||||
*/
|
||||
|
||||
import { describe, expect, test } from 'bun:test'
|
||||
import type { LocalJSXCommandModule } from '../../../types/command.js'
|
||||
import skillStoreCommand from '../index.js'
|
||||
|
||||
describe('skillStoreCommand definition', () => {
|
||||
test('name is skill-store', () => {
|
||||
expect(skillStoreCommand.name).toBe('skill-store')
|
||||
})
|
||||
|
||||
test('aliases include ss and cloud-skills', () => {
|
||||
expect(skillStoreCommand.aliases).toContain('ss')
|
||||
expect(skillStoreCommand.aliases).toContain('cloud-skills')
|
||||
})
|
||||
|
||||
test('type is local-jsx', () => {
|
||||
expect(skillStoreCommand.type).toBe('local-jsx')
|
||||
})
|
||||
|
||||
test('isHidden is boolean (dynamic: false when ANTHROPIC_API_KEY set, true when absent)', () => {
|
||||
// isHidden = !process.env['ANTHROPIC_API_KEY']
|
||||
expect(typeof skillStoreCommand.isHidden).toBe('boolean')
|
||||
})
|
||||
|
||||
test('isEnabled returns true', () => {
|
||||
const cmd = skillStoreCommand as unknown as { isEnabled: () => boolean }
|
||||
expect(cmd.isEnabled()).toBe(true)
|
||||
})
|
||||
|
||||
test('availability includes claude-ai', () => {
|
||||
expect(skillStoreCommand.availability).toContain('claude-ai')
|
||||
})
|
||||
|
||||
test('load resolves a call function', async () => {
|
||||
const cmd = skillStoreCommand as unknown as {
|
||||
load: () => Promise<LocalJSXCommandModule>
|
||||
}
|
||||
const loaded = await cmd.load()
|
||||
expect(typeof loaded.call).toBe('function')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user