@@ -1195,19 +1195,23 @@ describe('Find', function() {
1195
1195
1196
1196
// The actual test we wish to run
1197
1197
test : function ( done ) {
1198
- var configuration = this . configuration ;
1199
- var client = configuration . newClient ( configuration . writeConcernMax ( ) , { poolSize : 1 } ) ;
1198
+ const configuration = this . configuration ;
1199
+ const client = configuration . newClient ( configuration . writeConcernMax ( ) , { poolSize : 1 } ) ;
1200
1200
client . connect ( function ( err , client ) {
1201
- var db = client . db ( configuration . db ) ;
1201
+ const db = client . db ( configuration . db ) ;
1202
1202
db . createCollection ( 'timeoutFalse' , function ( err , collection ) {
1203
+ expect ( err ) . to . not . exist ;
1203
1204
collection . find ( { } , { timeout : false } , function ( err , cursor ) {
1204
- test . equal ( false , cursor . cmd . noCursorTimeout ) ;
1205
+ expect ( err ) . to . not . exist ;
1206
+ expect ( cursor . cmd . noCursorTimeout ) . to . be . true ;
1205
1207
1206
1208
collection . find ( { } , { timeout : true } , function ( err , cursor ) {
1207
- test . equal ( true , cursor . cmd . noCursorTimeout ) ;
1209
+ expect ( err ) . to . not . exist ;
1210
+ expect ( cursor . cmd . noCursorTimeout ) . to . be . false ;
1208
1211
1209
1212
collection . find ( { } , { } , function ( err , cursor ) {
1210
- test . ok ( ! cursor . cmd . noCursorTimeout ) ;
1213
+ expect ( err ) . to . not . exist ;
1214
+ expect ( cursor . cmd . noCursorTimeout ) . to . not . exist ;
1211
1215
1212
1216
client . close ( done ) ;
1213
1217
} ) ;
0 commit comments