@@ -38,11 +38,12 @@ describe('Serve Tools', () => {
3838
3939 mockContext = {
4040 devservers : new Map ( ) ,
41+ host : mockHost ,
4142 } as Partial < McpToolContext > as McpToolContext ;
4243 } ) ;
4344
4445 it ( 'should start and stop a dev server' , async ( ) => {
45- const startResult = await startDevserver ( { } , mockContext , mockHost ) ;
46+ const startResult = await startDevserver ( { } , mockContext ) ;
4647 expect ( startResult . structuredContent . message ) . toBe (
4748 `Development server for project '<default>' started and watching for workspace changes.` ,
4849 ) ;
@@ -56,7 +57,7 @@ describe('Serve Tools', () => {
5657 } ) ;
5758
5859 it ( 'should wait for a build to complete' , async ( ) => {
59- await startDevserver ( { } , mockContext , mockHost ) ;
60+ await startDevserver ( { } , mockContext ) ;
6061
6162 const waitPromise = waitForDevserverBuild ( { timeout : 10 } , mockContext ) ;
6263
@@ -78,7 +79,7 @@ describe('Serve Tools', () => {
7879
7980 it ( 'should handle multiple dev servers' , async ( ) => {
8081 // Start server for project 1. This uses the basic mockProcess created for the tests.
81- const startResult1 = await startDevserver ( { project : 'app-one' } , mockContext , mockHost ) ;
82+ const startResult1 = await startDevserver ( { project : 'app-one' } , mockContext ) ;
8283 expect ( startResult1 . structuredContent . message ) . toBe (
8384 `Development server for project 'app-one' started and watching for workspace changes.` ,
8485 ) ;
@@ -87,7 +88,7 @@ describe('Serve Tools', () => {
8788 // Start server for project 2, returning a new mock process.
8889 const process2 = new MockChildProcess ( ) ;
8990 mockHost . spawn . and . returnValue ( process2 as unknown as ChildProcess ) ;
90- const startResult2 = await startDevserver ( { project : 'app-two' } , mockContext , mockHost ) ;
91+ const startResult2 = await startDevserver ( { project : 'app-two' } , mockContext ) ;
9192 expect ( startResult2 . structuredContent . message ) . toBe (
9293 `Development server for project 'app-two' started and watching for workspace changes.` ,
9394 ) ;
@@ -116,7 +117,7 @@ describe('Serve Tools', () => {
116117 } ) ;
117118
118119 it ( 'should handle server crash' , async ( ) => {
119- await startDevserver ( { project : 'crash-app' } , mockContext , mockHost ) ;
120+ await startDevserver ( { project : 'crash-app' } , mockContext ) ;
120121
121122 // Simulate a crash with exit code 1
122123 mockProcess . stdout . emit ( 'data' , 'Fatal error.' ) ;
@@ -128,7 +129,7 @@ describe('Serve Tools', () => {
128129 } ) ;
129130
130131 it ( 'wait should timeout if build takes too long' , async ( ) => {
131- await startDevserver ( { project : 'timeout-app' } , mockContext , mockHost ) ;
132+ await startDevserver ( { project : 'timeout-app' } , mockContext ) ;
132133 const waitResult = await waitForDevserverBuild (
133134 { project : 'timeout-app' , timeout : 10 } ,
134135 mockContext ,
@@ -139,7 +140,7 @@ describe('Serve Tools', () => {
139140 it ( 'should wait through multiple cycles for a build to complete' , async ( ) => {
140141 jasmine . clock ( ) . install ( ) ;
141142 try {
142- await startDevserver ( { } , mockContext , mockHost ) ;
143+ await startDevserver ( { } , mockContext ) ;
143144
144145 // Immediately simulate a build starting so isBuilding() is true.
145146 mockProcess . stdout . emit ( 'data' , '❯ Changes detected. Rebuilding...' ) ;
0 commit comments