@@ -202,14 +202,23 @@ describe('Sessions - functional', function () {
202202 expect ( sessionTests ) . to . be . an ( 'object' ) ;
203203 context ( String ( sessionTests . description ) , function ( ) {
204204 // TODO: NODE-3393 fix test runner to apply session to all operations
205- const testsToSkip =
206- sessionTests . description === 'snapshot-sessions'
207- ? [
208- 'countDocuments operation with snapshot' ,
209- 'Distinct operation with snapshot' ,
210- 'Mixed operation with snapshot'
211- ]
212- : [ 'Server returns an error on distinct with snapshot' ] ;
205+ const skipTestMap = {
206+ 'snapshot-sessions' : [
207+ 'countDocuments operation with snapshot' ,
208+ 'Distinct operation with snapshot' ,
209+ 'Mixed operation with snapshot'
210+ ] ,
211+ 'snapshot-sessions-not-supported-server-error' : [
212+ 'Server returns an error on distinct with snapshot'
213+ ] ,
214+ 'snapshot-sessions-unsupported-ops' : [
215+ 'Server returns an error on listCollections with snapshot' ,
216+ 'Server returns an error on listDatabases with snapshot' ,
217+ 'Server returns an error on listIndexes with snapshot' ,
218+ 'Server returns an error on runCommand with snapshot'
219+ ]
220+ } ;
221+ const testsToSkip = skipTestMap [ sessionTests . description ] || [ ] ;
213222 for ( const test of sessionTests . tests ) {
214223 it ( String ( test . description ) , {
215224 metadata : { sessions : { skipLeakTests : true } } ,
0 commit comments