@@ -45,8 +45,12 @@ console.log(
45
45
`${ colors . BLUE } - Prompt-related options (--prompt-name, --prompt-args)${ colors . NC } ` ,
46
46
) ;
47
47
console . log ( `${ colors . BLUE } - Logging options (--log-level)${ colors . NC } ` ) ;
48
- console . log ( `${ colors . BLUE } - Transport types (--transport http/sse/stdio)${ colors . NC } ` ) ;
49
- console . log ( `${ colors . BLUE } - Transport inference from URL suffixes (/mcp, /sse)${ colors . NC } ` ) ;
48
+ console . log (
49
+ `${ colors . BLUE } - Transport types (--transport http/sse/stdio)${ colors . NC } ` ,
50
+ ) ;
51
+ console . log (
52
+ `${ colors . BLUE } - Transport inference from URL suffixes (/mcp, /sse)${ colors . NC } ` ,
53
+ ) ;
50
54
console . log ( `\n` ) ;
51
55
52
56
// Get directory paths
@@ -80,20 +84,18 @@ process.on("exit", () => {
80
84
) ;
81
85
}
82
86
83
- runningServers . forEach ( server => {
87
+ runningServers . forEach ( ( server ) => {
84
88
try {
85
89
process . kill ( - server . pid ) ;
86
- } catch ( e ) {
87
- }
90
+ } catch ( e ) { }
88
91
} ) ;
89
92
} ) ;
90
93
91
94
process . on ( "SIGINT" , ( ) => {
92
- runningServers . forEach ( server => {
95
+ runningServers . forEach ( ( server ) => {
93
96
try {
94
97
process . kill ( - server . pid ) ;
95
- } catch ( e ) {
96
- }
98
+ } catch ( e ) { }
97
99
} ) ;
98
100
process . exit ( 1 ) ;
99
101
} ) ;
@@ -230,7 +232,9 @@ async function runErrorTest(testName, ...args) {
230
232
} ) ;
231
233
232
234
const timeout = setTimeout ( ( ) => {
233
- console . log ( `${ colors . YELLOW } Error test timed out: ${ testName } ${ colors . NC } ` ) ;
235
+ console . log (
236
+ `${ colors . YELLOW } Error test timed out: ${ testName } ${ colors . NC } ` ,
237
+ ) ;
234
238
child . kill ( ) ;
235
239
} , 10000 ) ;
236
240
@@ -649,14 +653,20 @@ async function runTests() {
649
653
`\n${ colors . YELLOW } === Running HTTP Transport Tests ===${ colors . NC } ` ,
650
654
) ;
651
655
652
- console . log ( `${ colors . BLUE } Starting server-everything in streamableHttp mode.${ colors . NC } ` ) ;
653
- const httpServer = spawn ( "npx" , [ "@modelcontextprotocol/server-everything" , "streamableHttp" ] , {
654
- detached : true ,
655
- stdio : "ignore"
656
- } ) ;
656
+ console . log (
657
+ `${ colors . BLUE } Starting server-everything in streamableHttp mode.${ colors . NC } ` ,
658
+ ) ;
659
+ const httpServer = spawn (
660
+ "npx" ,
661
+ [ "@modelcontextprotocol/server-everything" , "streamableHttp" ] ,
662
+ {
663
+ detached : true ,
664
+ stdio : "ignore" ,
665
+ } ,
666
+ ) ;
657
667
runningServers . push ( httpServer ) ;
658
668
659
- await new Promise ( resolve => setTimeout ( resolve , 3000 ) ) ;
669
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 3000 ) ) ;
660
670
661
671
// Test 25: HTTP transport inferred from URL ending with /mcp
662
672
await runBasicTest (
@@ -703,9 +713,13 @@ async function runTests() {
703
713
// Kill HTTP server
704
714
try {
705
715
process . kill ( - httpServer . pid ) ;
706
- console . log ( `${ colors . BLUE } HTTP server killed, waiting for port to be released...${ colors . NC } ` ) ;
716
+ console . log (
717
+ `${ colors . BLUE } HTTP server killed, waiting for port to be released...${ colors . NC } ` ,
718
+ ) ;
707
719
} catch ( e ) {
708
- console . log ( `${ colors . RED } Error killing HTTP server: ${ e . message } ${ colors . NC } ` ) ;
720
+ console . log (
721
+ `${ colors . RED } Error killing HTTP server: ${ e . message } ${ colors . NC } ` ,
722
+ ) ;
709
723
}
710
724
711
725
// Print test summary
0 commit comments