@@ -2128,7 +2128,7 @@ describe("McpHub", () => {
21282128 const mcpHub = new McpHub ( mockProvider as ClineProvider )
21292129
21302130 // Wait for initialization
2131- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) )
2131+ await mcpHub . waitUntilReady ( )
21322132
21332133 // Verify StdioClientTransport was called with wrapped command
21342134 expect ( StdioClientTransport ) . toHaveBeenCalledWith (
@@ -2192,7 +2192,7 @@ describe("McpHub", () => {
21922192 const mcpHub = new McpHub ( mockProvider as ClineProvider )
21932193
21942194 // Wait for initialization
2195- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) )
2195+ await mcpHub . waitUntilReady ( )
21962196
21972197 // Verify StdioClientTransport was called without wrapping
21982198 expect ( StdioClientTransport ) . toHaveBeenCalledWith (
@@ -2256,7 +2256,7 @@ describe("McpHub", () => {
22562256 const mcpHub = new McpHub ( mockProvider as ClineProvider )
22572257
22582258 // Wait for initialization
2259- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) )
2259+ await mcpHub . waitUntilReady ( )
22602260
22612261 // Verify StdioClientTransport was called without double-wrapping
22622262 expect ( StdioClientTransport ) . toHaveBeenCalledWith (
@@ -2333,7 +2333,7 @@ describe("McpHub", () => {
23332333 const mcpHub = new McpHub ( mockProvider as ClineProvider )
23342334
23352335 // Wait for initialization
2336- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) )
2336+ await mcpHub . waitUntilReady ( )
23372337
23382338 // Verify that the command was wrapped with cmd.exe
23392339 expect ( StdioClientTransport ) . toHaveBeenCalledWith (
@@ -2402,7 +2402,7 @@ describe("McpHub", () => {
24022402 const mcpHub = new McpHub ( mockProvider as ClineProvider )
24032403
24042404 // Wait for initialization
2405- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) )
2405+ await mcpHub . waitUntilReady ( )
24062406
24072407 // Verify StdioClientTransport was called without double-wrapping
24082408 expect ( StdioClientTransport ) . toHaveBeenCalledWith (
0 commit comments