@@ -172,6 +172,23 @@ describe('Sessions - unit', function () {
172172 expect ( session . supports ) . property ( 'causalConsistency' , true ) ;
173173 } ) ;
174174
175+ it ( 'should default `causalConsistency` to `false` for explicit snapshot sessions' , function ( ) {
176+ const session = new ClientSession ( client , serverSessionPool , {
177+ explicit : true ,
178+ snapshot : true
179+ } ) ;
180+ expect ( session . supports ) . property ( 'causalConsistency' , false ) ;
181+ } ) ;
182+
183+ it ( 'should allow `causalConsistency=false` option in explicit snapshot sessions' , function ( ) {
184+ const session = new ClientSession ( client , serverSessionPool , {
185+ explicit : true ,
186+ causalConsistency : false ,
187+ snapshot : true
188+ } ) ;
189+ expect ( session . supports ) . property ( 'causalConsistency' , false ) ;
190+ } ) ;
191+
175192 it ( 'should respect `causalConsistency=false` option in explicit sessions' , function ( ) {
176193 const session = new ClientSession ( client , serverSessionPool , {
177194 explicit : true ,
@@ -180,7 +197,7 @@ describe('Sessions - unit', function () {
180197 expect ( session . supports ) . property ( 'causalConsistency' , false ) ;
181198 } ) ;
182199
183- it ( 'should respect `causalConsistency=true` option in explicit sessions' , function ( ) {
200+ it ( 'should respect `causalConsistency=true` option in explicit non-snapshot sessions' , function ( ) {
184201 const session = new ClientSession ( client , serverSessionPool , {
185202 explicit : true ,
186203 causalConsistency : true
0 commit comments