File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {
17
17
MongoDBAWS ,
18
18
type MongoDBNamespace ,
19
19
type MongoDBResponseConstructor ,
20
+ MongoError ,
20
21
MongoMissingCredentialsError ,
21
22
MongoServerError ,
22
23
setDifference
@@ -116,10 +117,17 @@ describe('MONGODB-AWS', function () {
116
117
sinon . restore ( ) ;
117
118
} ) ;
118
119
119
- it . only ( 'should use conversationId returned by saslStart in saslContinue' , async function ( ) {
120
+ it ( 'should use conversationId returned by saslStart in saslContinue' , async function ( ) {
120
121
client = this . configuration . newClient ( process . env . MONGODB_URI ) ; // use the URI built by the test environment
121
122
122
- await client . db ( 'aws' ) . collection ( 'aws_test' ) . estimatedDocumentCount ( ) ;
123
+ const err = await client
124
+ . db ( 'aws' )
125
+ . collection ( 'aws_test' )
126
+ . estimatedDocumentCount ( )
127
+ . catch ( e => e ) ;
128
+
129
+ // Expecting the saslContinue to fail since we changed the conversationId
130
+ expect ( err ) . to . be . instanceof ( MongoError ) ;
123
131
124
132
expect ( saslStartResult ) . to . not . be . undefined ;
125
133
expect ( saslContinue ) . to . not . be . undefined ;
You can’t perform that action at this time.
0 commit comments