initialize Electron desktop app and remove unused files
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { buildWorkflowSkillOptions, workflowAgentToSkillTarget } from '@/utils/hermes/workflow-skills'
|
||||
|
||||
describe('workflow skill helpers', () => {
|
||||
it('maps workflow agents to skill API targets', () => {
|
||||
expect(workflowAgentToSkillTarget('hermes')).toBe('hermes')
|
||||
expect(workflowAgentToSkillTarget('claude-code')).toBe('claude')
|
||||
expect(workflowAgentToSkillTarget('codex')).toBe('codex')
|
||||
expect(workflowAgentToSkillTarget('unknown-agent')).toBe('hermes')
|
||||
})
|
||||
|
||||
it('builds sorted enabled skill options without duplicate names', () => {
|
||||
expect(buildWorkflowSkillOptions({
|
||||
archived: [],
|
||||
categories: [
|
||||
{
|
||||
name: 'beta',
|
||||
description: '',
|
||||
skills: [
|
||||
{ name: 'write-report', description: '', enabled: true },
|
||||
{ name: 'disabled-skill', description: '', enabled: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'alpha',
|
||||
description: '',
|
||||
skills: [
|
||||
{ name: 'analyze-data', description: '' },
|
||||
{ name: 'write-report', description: '' },
|
||||
],
|
||||
},
|
||||
],
|
||||
})).toEqual([
|
||||
{ label: 'analyze-data', value: 'analyze-data' },
|
||||
{ label: 'write-report', value: 'write-report' },
|
||||
])
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user