@@ -172,6 +172,23 @@ describe('Sessions - unit', function () {
172
172
expect ( session . supports ) . property ( 'causalConsistency' , true ) ;
173
173
} ) ;
174
174
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
+
175
192
it ( 'should respect `causalConsistency=false` option in explicit sessions' , function ( ) {
176
193
const session = new ClientSession ( client , serverSessionPool , {
177
194
explicit : true ,
@@ -180,7 +197,7 @@ describe('Sessions - unit', function () {
180
197
expect ( session . supports ) . property ( 'causalConsistency' , false ) ;
181
198
} ) ;
182
199
183
- it ( 'should respect `causalConsistency=true` option in explicit sessions' , function ( ) {
200
+ it ( 'should respect `causalConsistency=true` option in explicit non-snapshot sessions' , function ( ) {
184
201
const session = new ClientSession ( client , serverSessionPool , {
185
202
explicit : true ,
186
203
causalConsistency : true
0 commit comments