@@ -4,6 +4,7 @@ import path from 'path';
44import { amazonQAdapter } from '../../../src/core/command-generation/adapters/amazon-q.js' ;
55import { antigravityAdapter } from '../../../src/core/command-generation/adapters/antigravity.js' ;
66import { auggieAdapter } from '../../../src/core/command-generation/adapters/auggie.js' ;
7+ import { avianAdapter } from '../../../src/core/command-generation/adapters/avian.js' ;
78import { claudeAdapter } from '../../../src/core/command-generation/adapters/claude.js' ;
89import { clineAdapter } from '../../../src/core/command-generation/adapters/cline.js' ;
910import { codexAdapter } from '../../../src/core/command-generation/adapters/codex.js' ;
@@ -183,6 +184,39 @@ describe('command-generation/adapters', () => {
183184 } ) ;
184185 } ) ;
185186
187+ describe ( 'avianAdapter' , ( ) => {
188+ it ( 'should have correct toolId' , ( ) => {
189+ expect ( avianAdapter . toolId ) . toBe ( 'avian' ) ;
190+ } ) ;
191+
192+ it ( 'should generate correct file path with nested opsx folder' , ( ) => {
193+ const filePath = avianAdapter . getFilePath ( 'explore' ) ;
194+ expect ( filePath ) . toBe ( path . join ( '.avian' , 'commands' , 'opsx' , 'explore.md' ) ) ;
195+ } ) ;
196+
197+ it ( 'should generate correct file paths for different commands' , ( ) => {
198+ expect ( avianAdapter . getFilePath ( 'new' ) ) . toBe ( path . join ( '.avian' , 'commands' , 'opsx' , 'new.md' ) ) ;
199+ expect ( avianAdapter . getFilePath ( 'bulk-archive' ) ) . toBe ( path . join ( '.avian' , 'commands' , 'opsx' , 'bulk-archive.md' ) ) ;
200+ } ) ;
201+
202+ it ( 'should format file with name, description, category, and tags' , ( ) => {
203+ const output = avianAdapter . formatFile ( sampleContent ) ;
204+ expect ( output ) . toContain ( '---\n' ) ;
205+ expect ( output ) . toContain ( 'name: OpenSpec Explore' ) ;
206+ expect ( output ) . toContain ( 'description: Enter explore mode for thinking' ) ;
207+ expect ( output ) . toContain ( 'category: Workflow' ) ;
208+ expect ( output ) . toContain ( 'tags: [workflow, explore, experimental]' ) ;
209+ expect ( output ) . toContain ( '---\n\n' ) ;
210+ expect ( output ) . toContain ( 'This is the command body.\n\nWith multiple lines.' ) ;
211+ } ) ;
212+
213+ it ( 'should handle empty tags' , ( ) => {
214+ const contentNoTags : CommandContent = { ...sampleContent , tags : [ ] } ;
215+ const output = avianAdapter . formatFile ( contentNoTags ) ;
216+ expect ( output ) . toContain ( 'tags: []' ) ;
217+ } ) ;
218+ } ) ;
219+
186220 describe ( 'clineAdapter' , ( ) => {
187221 it ( 'should have correct toolId' , ( ) => {
188222 expect ( clineAdapter . toolId ) . toBe ( 'cline' ) ;
@@ -606,7 +640,7 @@ describe('command-generation/adapters', () => {
606640 it ( 'All adapters use path.join for paths' , ( ) => {
607641 // Verify all adapters produce valid paths
608642 const adapters = [
609- amazonQAdapter , antigravityAdapter , auggieAdapter , clineAdapter ,
643+ amazonQAdapter , antigravityAdapter , auggieAdapter , avianAdapter , clineAdapter ,
610644 codexAdapter , codebuddyAdapter , continueAdapter , costrictAdapter ,
611645 crushAdapter , factoryAdapter , geminiAdapter , githubCopilotAdapter ,
612646 iflowAdapter , kilocodeAdapter , opencodeAdapter , piAdapter , qoderAdapter ,
0 commit comments