@@ -10,6 +10,7 @@ import { createMockExecutor } from '../../../../test-utils/mock-executors.ts';
1010import { sessionStore } from '../../../../utils/session-store.ts' ;
1111import { schema , handler , get_sim_app_pathLogic } from '../get_sim_app_path.ts' ;
1212import type { CommandExecutor } from '../../../../utils/CommandExecutor.ts' ;
13+ import { XcodePlatform } from '../../../../types/common.ts' ;
1314
1415describe ( 'get_sim_app_path tool' , ( ) => {
1516 beforeEach ( ( ) => {
@@ -24,7 +25,7 @@ describe('get_sim_app_path tool', () => {
2425 it ( 'should expose only platform in public schema' , ( ) => {
2526 const schemaObj = z . object ( schema ) ;
2627
27- expect ( schemaObj . safeParse ( { platform : 'iOS Simulator' } ) . success ) . toBe ( true ) ;
28+ expect ( schemaObj . safeParse ( { platform : XcodePlatform . iOSSimulator } ) . success ) . toBe ( true ) ;
2829 expect ( schemaObj . safeParse ( { } ) . success ) . toBe ( false ) ;
2930 expect ( schemaObj . safeParse ( { platform : 'iOS' } ) . success ) . toBe ( false ) ;
3031
@@ -36,7 +37,7 @@ describe('get_sim_app_path tool', () => {
3637 describe ( 'Handler Requirements' , ( ) => {
3738 it ( 'should require scheme when not provided' , async ( ) => {
3839 const result = await handler ( {
39- platform : 'iOS Simulator' ,
40+ platform : XcodePlatform . iOSSimulator ,
4041 } ) ;
4142
4243 expect ( result . isError ) . toBe ( true ) ;
@@ -47,7 +48,7 @@ describe('get_sim_app_path tool', () => {
4748 sessionStore . setDefaults ( { scheme : 'MyScheme' } ) ;
4849
4950 const result = await handler ( {
50- platform : 'iOS Simulator' ,
51+ platform : XcodePlatform . iOSSimulator ,
5152 } ) ;
5253
5354 expect ( result . isError ) . toBe ( true ) ;
@@ -61,7 +62,7 @@ describe('get_sim_app_path tool', () => {
6162 } ) ;
6263
6364 const result = await handler ( {
64- platform : 'iOS Simulator' ,
65+ platform : XcodePlatform . iOSSimulator ,
6566 } ) ;
6667
6768 expect ( result . isError ) . toBe ( true ) ;
@@ -72,7 +73,7 @@ describe('get_sim_app_path tool', () => {
7273 sessionStore . setDefaults ( { scheme : 'MyScheme' } ) ;
7374
7475 const result = await handler ( {
75- platform : 'iOS Simulator' ,
76+ platform : XcodePlatform . iOSSimulator ,
7677 projectPath : '/path/project.xcodeproj' ,
7778 workspacePath : '/path/workspace.xcworkspace' ,
7879 } ) ;
@@ -90,7 +91,7 @@ describe('get_sim_app_path tool', () => {
9091 } ) ;
9192
9293 const result = await handler ( {
93- platform : 'iOS Simulator' ,
94+ platform : XcodePlatform . iOSSimulator ,
9495 simulatorId : 'SIM-UUID' ,
9596 simulatorName : 'iPhone 16' ,
9697 } ) ;
@@ -134,7 +135,7 @@ describe('get_sim_app_path tool', () => {
134135 {
135136 workspacePath : '/path/to/workspace.xcworkspace' ,
136137 scheme : 'MyScheme' ,
137- platform : 'iOS Simulator' ,
138+ platform : XcodePlatform . iOSSimulator ,
138139 simulatorName : 'iPhone 16' ,
139140 useLatestOS : true ,
140141 } ,
@@ -173,7 +174,7 @@ describe('get_sim_app_path tool', () => {
173174 {
174175 projectPath : '/path/to/project.xcodeproj' ,
175176 scheme : 'MyScheme' ,
176- platform : 'iOS Simulator' ,
177+ platform : XcodePlatform . iOSSimulator ,
177178 simulatorId : 'SIM-UUID' ,
178179 } ,
179180 mockExecutor ,
0 commit comments