@@ -8,7 +8,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
88import {
99 COPILOT_SETUP_WORKFLOW_PATH ,
1010 detectExistingAgentTargetPaths ,
11- detectExistingAgentTargetPath ,
1211 hasExistingAgentInstructions ,
1312 replaceMarkedAgentInstructionsSection ,
1413 resolveAgentOptions ,
@@ -376,7 +375,7 @@ describe('selectAgentTargetPaths', () => {
376375 } ) ;
377376} ) ;
378377
379- describe ( 'detectExistingAgentTargetPath ' , ( ) => {
378+ describe ( 'detectExistingAgentTargetPaths ' , ( ) => {
380379 it ( 'detects all existing regular agent files' , async ( ) => {
381380 const dir = await createProjectDir ( ) ;
382381 await mockFs . writeFile ( path . join ( dir , 'AGENTS.md' ) , '# Agents' ) ;
@@ -389,14 +388,14 @@ describe('detectExistingAgentTargetPath', () => {
389388 const dir = await createProjectDir ( ) ;
390389 await mockFs . writeFile ( path . join ( dir , 'CLAUDE.md' ) , '# Claude' ) ;
391390
392- expect ( detectExistingAgentTargetPath ( dir ) ) . toBe ( 'CLAUDE.md' ) ;
391+ expect ( detectExistingAgentTargetPaths ( dir ) ) . toEqual ( [ 'CLAUDE.md' ] ) ;
393392 } ) ;
394393
395394 it ( 'ignores symlinked agent files' , async ( ) => {
396395 const dir = await createProjectDir ( ) ;
397396 await mockFs . symlink ( 'AGENTS.md' , path . join ( dir , 'CLAUDE.md' ) ) ;
398397
399- expect ( detectExistingAgentTargetPath ( dir ) ) . toBeUndefined ( ) ;
398+ expect ( detectExistingAgentTargetPaths ( dir ) ) . toBeUndefined ( ) ;
400399 } ) ;
401400} ) ;
402401
0 commit comments