@@ -65,18 +65,18 @@ describeWithAtlas("db users", (integration) => {
6565
6666 const elements = getResponseElements ( response ) ;
6767 expect ( elements ) . toHaveLength ( 1 ) ;
68- expect ( elements [ 0 ] . text ) . toContain ( "created successfully" ) ;
69- expect ( elements [ 0 ] . text ) . toContain ( userName ) ;
70- expect ( elements [ 0 ] . text ) . not . toContain ( "testpassword" ) ;
68+ expect ( elements [ 0 ] ? .text ) . toContain ( "created successfully" ) ;
69+ expect ( elements [ 0 ] ? .text ) . toContain ( userName ) ;
70+ expect ( elements [ 0 ] ? .text ) . not . toContain ( "testpassword" ) ;
7171 } ) ;
7272
7373 it ( "should create a database user with generated password" , async ( ) => {
7474 const response = await createUserWithMCP ( ) ;
7575 const elements = getResponseElements ( response ) ;
7676 expect ( elements ) . toHaveLength ( 1 ) ;
77- expect ( elements [ 0 ] . text ) . toContain ( "created successfully" ) ;
78- expect ( elements [ 0 ] . text ) . toContain ( userName ) ;
79- expect ( elements [ 0 ] . text ) . toContain ( "with password: `" ) ;
77+ expect ( elements [ 0 ] ? .text ) . toContain ( "created successfully" ) ;
78+ expect ( elements [ 0 ] ? .text ) . toContain ( userName ) ;
79+ expect ( elements [ 0 ] ? .text ) . toContain ( "with password: `" ) ;
8080 } ) ;
8181 } ) ;
8282 describe ( "atlas-list-db-users" , ( ) => {
@@ -98,7 +98,7 @@ describeWithAtlas("db users", (integration) => {
9898 . callTool ( { name : "atlas-list-db-users" , arguments : { projectId } } ) ) as CallToolResult ;
9999 expect ( response . content ) . toBeArray ( ) ;
100100 expect ( response . content ) . toHaveLength ( 1 ) ;
101- expect ( response . content [ 0 ] . text ) . toContain ( userName ) ;
101+ expect ( response . content [ 0 ] ? .text ) . toContain ( userName ) ;
102102 } ) ;
103103 } ) ;
104104 } ) ;
0 commit comments