Skip to content

Commit e20ca0b

Browse files
committed
Fix failing tests
1 parent 60f16ce commit e20ca0b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/mcp/tools/discovery/__tests__/discover_tools.test.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ describe('discover_tools', () => {
116116

117117
it('should have correct description', () => {
118118
expect(discoverTools.description).toBe(
119-
'Analyzes a natural language task description to enable a relevant set of Xcode and Apple development tools. For best results, specify the target platform (iOS, macOS, watchOS, tvOS, visionOS) and project type (.xcworkspace or .xcodeproj).',
119+
'Analyzes a natural language task description and enables the most relevant development workflow. Prioritizes project/workspace workflows (simulator/device/macOS) and also supports task-based workflows (simulator-management, logging, diagnostics) and Swift packages.',
120120
);
121121
});
122122

@@ -656,9 +656,10 @@ describe('discover_tools', () => {
656656
const prompt = requestCall[0].messages[0].content.text;
657657

658658
expect(prompt).toContain(taskDescription);
659-
expect(prompt).toContain('Project Type Selection Guide');
660-
expect(prompt).toContain('Platform Selection Guide');
661-
expect(prompt).toContain('Available Workflows');
659+
expect(prompt).toContain('Select EXACTLY ONE workflow');
660+
expect(prompt).toContain('Primary (project/workspace-based) workflows:');
661+
expect(prompt).toContain('Secondary (task-based, no project/workspace needed):');
662+
expect(prompt).toContain('All available workflows:');
662663
});
663664

664665
it('should provide clear selection guidelines in prompt', async () => {
@@ -693,11 +694,11 @@ describe('discover_tools', () => {
693694
const requestCall = requestCalls[0];
694695
const prompt = requestCall[0].messages[0].content.text;
695696

696-
expect(prompt).toContain('Choose ONLY ONE workflow');
697-
expect(prompt).toContain('If working with .xcworkspace files');
698-
expect(prompt).toContain('If working with .xcodeproj files');
699-
expect(prompt).toContain('iOS development on simulators');
700-
expect(prompt).toContain('macOS development');
697+
expect(prompt).toContain('Select EXACTLY ONE workflow');
698+
expect(prompt).toContain('.xcworkspace');
699+
expect(prompt).toContain('.xcodeproj');
700+
expect(prompt).toContain('simulator-management');
701+
expect(prompt).toContain('macOS');
701702
expect(prompt).toContain('Respond with ONLY a JSON array');
702703
});
703704
});

0 commit comments

Comments
 (0)