@@ -1677,7 +1677,7 @@ describe('Cursor', function () {
1677
1677
collection . insertOne ( { x : 1 , a : 2 } , configuration . writeConcernMax ( ) , err => {
1678
1678
expect ( err ) . to . not . exist ;
1679
1679
1680
- collection . find ( { } , { fields : { x : 0 } } ) . toArray ( ( err , items ) => {
1680
+ collection . find ( { } , { projection : { x : 0 } } ) . toArray ( ( err , items ) => {
1681
1681
expect ( err ) . to . not . exist ;
1682
1682
test . equal ( 1 , items . length ) ;
1683
1683
test . equal ( 2 , items [ 0 ] . a ) ;
@@ -2184,8 +2184,8 @@ describe('Cursor', function () {
2184
2184
collection . insert ( { a : 1 } , configuration . writeConcernMax ( ) , err => {
2185
2185
expect ( err ) . to . not . exist ;
2186
2186
2187
- // Create cursor with awaitdata , and timeout after the period specified
2188
- const cursor = collection . find ( { } , { tailable : true , awaitdata : true } ) ;
2187
+ // Create cursor with awaitData , and timeout after the period specified
2188
+ const cursor = collection . find ( { } , { tailable : true , awaitData : true } ) ;
2189
2189
this . defer ( ( ) => cursor . close ( ) ) ;
2190
2190
2191
2191
// Execute each
@@ -2196,7 +2196,7 @@ describe('Cursor', function () {
2196
2196
2197
2197
if ( err != null ) {
2198
2198
// Even though cursor is exhausted, should not close session
2199
- // unless cursor is manually closed, due to awaitdata / tailable
2199
+ // unless cursor is manually closed, due to awaitData / tailable
2200
2200
done ( ) ;
2201
2201
}
2202
2202
} ) ;
@@ -2228,8 +2228,8 @@ describe('Cursor', function () {
2228
2228
db . createCollection ( 'should_await_data_no_docs' , options , ( err , collection ) => {
2229
2229
expect ( err ) . to . not . exist ;
2230
2230
2231
- // Create cursor with awaitdata , and timeout after the period specified
2232
- const cursor = collection . find ( { } , { tailable : true , awaitdata : true } ) ;
2231
+ // Create cursor with awaitData , and timeout after the period specified
2232
+ const cursor = collection . find ( { } , { tailable : true , awaitData : true } ) ;
2233
2233
this . defer ( ( ) => cursor . close ( ) ) ;
2234
2234
2235
2235
const rewind = cursor . rewind ;
@@ -2273,7 +2273,7 @@ describe('Cursor', function () {
2273
2273
2274
2274
collection . insert ( { a : 1 } , configuration . writeConcernMax ( ) , err => {
2275
2275
expect ( err ) . to . not . exist ;
2276
- // Create cursor with awaitdata , and timeout after the period specified
2276
+ // Create cursor with awaitData , and timeout after the period specified
2277
2277
const cursor = collection . find ( { } , { } ) ;
2278
2278
this . defer ( ( ) => cursor . close ( ) ) ;
2279
2279
@@ -2282,7 +2282,7 @@ describe('Cursor', function () {
2282
2282
cursor . each ( err => {
2283
2283
if ( err != null ) {
2284
2284
// Even though cursor is exhausted, should not close session
2285
- // unless cursor is manually closed, due to awaitdata / tailable
2285
+ // unless cursor is manually closed, due to awaitData / tailable
2286
2286
done ( ) ;
2287
2287
} else {
2288
2288
cursor . kill ( ) ;
@@ -2309,7 +2309,7 @@ describe('Cursor', function () {
2309
2309
db.createCollection('should_not_await_data_when_false', options, function(err, collection) {
2310
2310
collection.insert({a:1}, configuration.writeConcernMax(), function(err, result) {
2311
2311
// should not timeout
2312
- collection.find({}, {tailable:true, awaitdata :false}).each(function(err, result) {
2312
+ collection.find({}, {tailable:true, awaitData :false}).each(function(err, result) {
2313
2313
test.ok(err != null);
2314
2314
});
2315
2315
@@ -2345,8 +2345,8 @@ describe('Cursor', function () {
2345
2345
collection . insert ( { a : 1 } , configuration . writeConcernMax ( ) , err => {
2346
2346
expect ( err ) . to . not . exist ;
2347
2347
2348
- // Create cursor with awaitdata , and timeout after the period specified
2349
- var cursor = collection . find ( { } , { tailable : true , awaitdata : true } ) ;
2348
+ // Create cursor with awaitData , and timeout after the period specified
2349
+ var cursor = collection . find ( { } , { tailable : true , awaitData : true } ) ;
2350
2350
cursor . each ( err => {
2351
2351
if ( err != null ) {
2352
2352
// kill cursor b/c cursor is tailable / awaitable
@@ -3528,7 +3528,7 @@ describe('Cursor', function () {
3528
3528
expect ( err ) . to . not . exist ;
3529
3529
3530
3530
var s = new Date ( ) ;
3531
- // Create cursor with awaitdata , and timeout after the period specified
3531
+ // Create cursor with awaitData , and timeout after the period specified
3532
3532
var cursor = collection
3533
3533
. find ( { } )
3534
3534
. addCursorFlag ( 'tailable' , true )
0 commit comments