4
4
expectDefined ,
5
5
getResponseElements ,
6
6
setupIntegrationTest ,
7
+ waitUntilMcpClientIsSet ,
7
8
} from "../../helpers.js" ;
8
9
import { describe , expect , it } from "vitest" ;
9
10
@@ -17,22 +18,26 @@ describe("atlas-local-list-deployments", () => {
17
18
( ) => defaultDriverOptions
18
19
) ;
19
20
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
+
21
24
const { tools } = await integration . mcpClient ( ) . listTools ( ) ;
22
25
const listDeployments = tools . find ( ( tool ) => tool . name === "atlas-local-list-deployments" ) ;
23
26
expectDefined ( listDeployments ) ;
24
27
} ) ;
25
28
26
29
it . skipIf ( ! isMacOSInGitHubActions ) (
27
30
"[MacOS in GitHub Actions] should not have the atlas-local-list-deployments tool" ,
28
- async ( ) => {
31
+ async ( { signal } ) => {
32
+ await waitUntilMcpClientIsSet ( integration . mcpServer ( ) , signal ) ;
29
33
const { tools } = await integration . mcpClient ( ) . listTools ( ) ;
30
34
const listDeployments = tools . find ( ( tool ) => tool . name === "atlas-local-list-deployments" ) ;
31
35
expect ( listDeployments ) . toBeUndefined ( ) ;
32
36
}
33
37
) ;
34
38
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 ) ;
36
41
const { tools } = await integration . mcpClient ( ) . listTools ( ) ;
37
42
const listDeployments = tools . find ( ( tool ) => tool . name === "atlas-local-list-deployments" ) ;
38
43
expectDefined ( listDeployments ) ;
@@ -41,7 +46,9 @@ describe("atlas-local-list-deployments", () => {
41
46
expect ( listDeployments . inputSchema . properties ) . toEqual ( { } ) ;
42
47
} ) ;
43
48
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
+
45
52
const response = await integration . mcpClient ( ) . callTool ( {
46
53
name : "atlas-local-list-deployments" ,
47
54
arguments : { } ,
0 commit comments