@@ -193,18 +193,20 @@ describe('Sessions - unit', function () {
193
193
expect ( session . supports ) . property ( 'causalConsistency' , false ) ;
194
194
} ) ;
195
195
196
- it ( 'should set `causalConsistency` to ` false` in implicit sessions regardless of options ' , function ( ) {
197
- const sessionTrue = new ClientSession ( client , serverSessionPool , {
196
+ it ( 'should respect `causalConsistency= false` option in implicit sessions' , function ( ) {
197
+ const session = new ClientSession ( client , serverSessionPool , {
198
198
explicit : false ,
199
- causalConsistency : true
199
+ causalConsistency : false
200
200
} ) ;
201
- expect ( sessionTrue . supports ) . property ( 'causalConsistency' , false ) ;
201
+ expect ( session . supports ) . property ( 'causalConsistency' , false ) ;
202
+ } ) ;
202
203
203
- const sessionFalse = new ClientSession ( client , serverSessionPool , {
204
+ it ( 'should respect `causalConsistency=true` option in implicit sessions' , function ( ) {
205
+ const session = new ClientSession ( client , serverSessionPool , {
204
206
explicit : false ,
205
- causalConsistency : false
207
+ causalConsistency : true
206
208
} ) ;
207
- expect ( sessionFalse . supports ) . property ( 'causalConsistency' , false ) ;
209
+ expect ( session . supports ) . property ( 'causalConsistency' , true ) ;
208
210
} ) ;
209
211
210
212
it ( 'should default to `null` for `clusterTime`' , function ( ) {
0 commit comments