File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ describe('MONGODB-AWS', function () {
88
88
options : CommandOptions ,
89
89
responseType ?: MongoDBResponseConstructor
90
90
) {
91
+ if ( command . saslContinue != null ) {
92
+ saslContinue = { ...command } ;
93
+ }
94
+
91
95
const result = await commandStub . wrappedMethod . call (
92
96
this ,
93
97
ns ,
@@ -96,22 +100,18 @@ describe('MONGODB-AWS', function () {
96
100
responseType
97
101
) ;
98
102
99
- if ( command . saslStart != null && command . mechanism === 'MONGODB-AWS' ) {
103
+ if ( command . saslStart != null ) {
100
104
// Modify the result of the saslStart to check if the saslContinue uses it
101
105
result . conversationId = 999 ;
102
106
saslStartResult = { ...result } ;
103
107
}
104
108
105
- if ( command . saslContinue != null ) {
106
- console . log ( 'saving saslContinue' ) ;
107
- saslContinue = { ...command } ;
108
- }
109
-
110
109
return result ;
111
110
} ) ;
112
111
} ) ;
113
112
114
113
afterEach ( function ( ) {
114
+ commandStub . restore ( ) ;
115
115
sinon . restore ( ) ;
116
116
} ) ;
117
117
@@ -123,7 +123,6 @@ describe('MONGODB-AWS', function () {
123
123
. collection ( 'aws_test' )
124
124
. estimatedDocumentCount ( )
125
125
. catch ( e => e ) ;
126
- console . log ( err ) ;
127
126
128
127
// Expecting the saslContinue to fail since we changed the conversationId
129
128
expect ( err ) . to . be . instanceof ( MongoServerError ) ;
You can’t perform that action at this time.
0 commit comments