@@ -32,10 +32,12 @@ describe('sagemaker_connect script', function () {
3232 it ( 'parses cursor format sm_cursor_<creds-type>_<arn>' , async function ( ) {
3333 const hostname = 'sm_cursor_lc_arn_._aws_sagemaker_us-east-1_123456789012_domain__d-abc123'
3434
35- const result = await new ChildProcess ( 'bash' , [ scriptPath , hostname ] , { timeout : 5000 } ) . run ( )
35+ const result = await new ChildProcess ( 'bash' , [ scriptPath , hostname ] ) . run ( {
36+ spawnOptions : { timeout : 5000 } ,
37+ } )
3638
3739 const output = result . stderr + result . stdout
38- assert . ok ( ! output . includes ( 'Invalid hostname format ' ) )
40+ assert . ok ( ! output . includes ( 'Invalid hostname npmformat ' ) )
3941 } )
4042
4143 it ( 'rejects invalid hostname format' , async function ( ) {
@@ -97,11 +99,13 @@ describe('sagemaker_connect script', function () {
9799 it ( 'parses cursor format sm_cursor_<creds-type>_<arn>' , async function ( ) {
98100 const hostname = 'sm_cursor_lc_arn_._aws_sagemaker_us-east-1_123456789012_domain__d-abc123'
99101
100- const result = await new ChildProcess (
101- 'powershell.exe' ,
102- [ '-ExecutionPolicy' , 'Bypass' , '-File' , psScriptPath , hostname ] ,
103- { timeout : 5000 }
104- ) . run ( )
102+ const result = await new ChildProcess ( 'powershell.exe' , [
103+ '-ExecutionPolicy' ,
104+ 'Bypass' ,
105+ '-File' ,
106+ psScriptPath ,
107+ hostname ,
108+ ] ) . run ( { spawnOptions : { timeout : 5000 } } )
105109
106110 const output = result . stderr + result . stdout
107111 assert . ok ( ! output . includes ( 'Invalid hostname format' ) )
0 commit comments