@@ -2,25 +2,23 @@ import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
22import { setupIntegrationTest } from "../../helpers.js" ;
33import { parseTable , describeAtlas } from "./atlasHelpers.js" ;
44
5- describeAtlas ( "orgs" , ( ) => {
6- setupIntegrationTest ( "tests" , ( integration ) => {
7- describe ( "atlas-list-orgs" , ( ) => {
8- it ( "should have correct metadata" , async ( ) => {
9- const { tools } = await integration . mcpClient ( ) . listTools ( ) ;
10- const listOrgs = tools . find ( ( tool ) => tool . name === "atlas-list-orgs" ) ;
11- expect ( listOrgs ) . toBeDefined ( ) ;
12- } ) ;
5+ describeAtlas ( "orgs" , ( integration ) => {
6+ describe ( "atlas-list-orgs" , ( ) => {
7+ it ( "should have correct metadata" , async ( ) => {
8+ const { tools } = await integration . mcpClient ( ) . listTools ( ) ;
9+ const listOrgs = tools . find ( ( tool ) => tool . name === "atlas-list-orgs" ) ;
10+ expect ( listOrgs ) . toBeDefined ( ) ;
11+ } ) ;
1312
14- it ( "returns org names" , async ( ) => {
15- const response = ( await integration
16- . mcpClient ( )
17- . callTool ( { name : "atlas-list-orgs" , arguments : { } } ) ) as CallToolResult ;
18- expect ( response . content ) . toBeArray ( ) ;
19- expect ( response . content ) . toHaveLength ( 1 ) ;
20- const data = parseTable ( response . content [ 0 ] . text as string ) ;
21- expect ( data ) . toHaveLength ( 1 ) ;
22- expect ( data [ 0 ] [ "Organization Name" ] ) . toEqual ( "MongoDB MCP Test" ) ;
23- } ) ;
13+ it ( "returns org names" , async ( ) => {
14+ const response = ( await integration
15+ . mcpClient ( )
16+ . callTool ( { name : "atlas-list-orgs" , arguments : { } } ) ) as CallToolResult ;
17+ expect ( response . content ) . toBeArray ( ) ;
18+ expect ( response . content ) . toHaveLength ( 1 ) ;
19+ const data = parseTable ( response . content [ 0 ] . text as string ) ;
20+ expect ( data ) . toHaveLength ( 1 ) ;
21+ expect ( data [ 0 ] [ "Organization Name" ] ) . toEqual ( "MongoDB MCP Test" ) ;
2422 } ) ;
2523 } ) ;
2624} ) ;
0 commit comments