44 expectDefined ,
55 getResponseElements ,
66 setupIntegrationTest ,
7+ waitUntilMcpClientIsSet ,
78} from "../../helpers.js" ;
89import { describe , expect , it } from "vitest" ;
910
@@ -17,22 +18,26 @@ describe("atlas-local-list-deployments", () => {
1718 ( ) => defaultDriverOptions
1819 ) ;
1920
20- it . skipIf ( isMacOSInGitHubActions ) ( "should have the atlas-local-list-deployments tool" , async ( ) => {
21+ it . skipIf ( isMacOSInGitHubActions ) ( "should have the atlas-local-list-deployments tool" , async ( { signal } ) => {
22+ await waitUntilMcpClientIsSet ( integration . mcpServer ( ) , signal ) ;
23+
2124 const { tools } = await integration . mcpClient ( ) . listTools ( ) ;
2225 const listDeployments = tools . find ( ( tool ) => tool . name === "atlas-local-list-deployments" ) ;
2326 expectDefined ( listDeployments ) ;
2427 } ) ;
2528
2629 it . skipIf ( ! isMacOSInGitHubActions ) (
2730 "[MacOS in GitHub Actions] should not have the atlas-local-list-deployments tool" ,
28- async ( ) => {
31+ async ( { signal } ) => {
32+ await waitUntilMcpClientIsSet ( integration . mcpServer ( ) , signal ) ;
2933 const { tools } = await integration . mcpClient ( ) . listTools ( ) ;
3034 const listDeployments = tools . find ( ( tool ) => tool . name === "atlas-local-list-deployments" ) ;
3135 expect ( listDeployments ) . toBeUndefined ( ) ;
3236 }
3337 ) ;
3438
35- it . skipIf ( isMacOSInGitHubActions ) ( "should have correct metadata" , async ( ) => {
39+ it . skipIf ( isMacOSInGitHubActions ) ( "should have correct metadata" , async ( { signal } ) => {
40+ await waitUntilMcpClientIsSet ( integration . mcpServer ( ) , signal ) ;
3641 const { tools } = await integration . mcpClient ( ) . listTools ( ) ;
3742 const listDeployments = tools . find ( ( tool ) => tool . name === "atlas-local-list-deployments" ) ;
3843 expectDefined ( listDeployments ) ;
@@ -41,7 +46,9 @@ describe("atlas-local-list-deployments", () => {
4146 expect ( listDeployments . inputSchema . properties ) . toEqual ( { } ) ;
4247 } ) ;
4348
44- it . skipIf ( isMacOSInGitHubActions ) ( "should not crash when calling the tool" , async ( ) => {
49+ it . skipIf ( isMacOSInGitHubActions ) ( "should not crash when calling the tool" , async ( { signal } ) => {
50+ await waitUntilMcpClientIsSet ( integration . mcpServer ( ) , signal ) ;
51+
4552 const response = await integration . mcpClient ( ) . callTool ( {
4653 name : "atlas-local-list-deployments" ,
4754 arguments : { } ,
0 commit comments