@@ -23,11 +23,13 @@ import { ensureString } from '@salesforce/ts-types';
2323import { createScratchOrgParams } from '../../src/tools/create_scratch_org.js' ;
2424import { resumeParamsSchema } from '../../src/tools/resume_tool_operation.js' ;
2525
26+ const isCI = process . env . CI === 'true' || process . env . GITHUB_ACTIONS === 'true' ;
27+
2628describe ( 'create_scratch_org' , ( ) => {
2729 const client = new McpTestClient ( {
2830 timeout : 120_000 ,
2931 } ) ;
30-
32+
3133 let devHubUsername : string ;
3234
3335 let testSession : TestSession ;
@@ -63,15 +65,16 @@ describe('create_scratch_org', () => {
6365 }
6466 } ) ;
6567
66- it ( 'should create a scratch org' , async ( ) => {
68+ it ( 'should create a scratch org' , async function ( ) {
69+ if ( isCI ) this . skip ( ) ;
6770 const result = await client . callTool ( createScratchOrgSchema , {
6871 name : 'create_scratch_org' ,
6972 params : {
7073 directory : testSession . project . dir ,
7174 devHub : devHubUsername ,
7275 } ,
7376 } ) ;
74-
77+
7578 expect ( result . isError ) . to . be . false ;
7679 expect ( result . content . length ) . to . equal ( 1 ) ;
7780 expect ( result . content [ 0 ] . type ) . to . equal ( 'text' ) ;
@@ -81,7 +84,8 @@ describe('create_scratch_org', () => {
8184 expect ( responseText ) . to . include ( 'Successfully created scratch org' ) ;
8285 } ) ;
8386
84- it ( 'should create scratch org asynchronously' , async ( ) => {
87+ it ( 'should create scratch org asynchronously' , async function ( ) {
88+ if ( isCI ) this . skip ( ) ;
8589 const asyncResult = await client . callTool ( createScratchOrgSchema , {
8690 name : 'create_scratch_org' ,
8791 params : {
@@ -130,7 +134,8 @@ describe('create_scratch_org', () => {
130134 expect ( asyncResumeResponseText ) . to . include ( 'Successfully created scratch org' ) ;
131135 } ) ;
132136
133- it ( 'should create scratch org with optional parameters' , async ( ) => {
137+ it ( 'should create scratch org with optional parameters' , async function ( ) {
138+ if ( isCI ) this . skip ( ) ;
134139 const result = await client . callTool ( createScratchOrgSchema , {
135140 name : 'create_scratch_org' ,
136141 params : {
0 commit comments