@@ -170,8 +170,9 @@ describe('Ignore Undefined', function () {
170
170
171
171
// Locate the doument
172
172
collection . findOne ( ( err , item ) => {
173
+ expect ( err ) . to . not . exist ;
173
174
expect ( item ) . to . have . property ( 'a' , 1 ) ;
174
- expect ( item . b ) . to . be . undefined ;
175
+ expect ( item ) . to . not . have . property ( 'b' ) ;
175
176
done ( ) ;
176
177
} ) ;
177
178
} ) ;
@@ -193,8 +194,9 @@ describe('Ignore Undefined', function () {
193
194
194
195
// Locate the doument
195
196
collection . findOne ( ( err , item ) => {
197
+ expect ( err ) . to . not . exist ;
196
198
expect ( item ) . to . have . property ( 'a' , 1 ) ;
197
- expect ( item . b ) . to . be . undefined ;
199
+ expect ( item ) . to . not . have . property ( 'b' ) ;
198
200
done ( ) ;
199
201
} ) ;
200
202
} ) ;
@@ -217,7 +219,7 @@ describe('Ignore Undefined', function () {
217
219
collection . findOne ( { } , ( err , item ) => {
218
220
expect ( err ) . to . not . exist ;
219
221
expect ( item ) . to . have . property ( 'a' , 1 ) ;
220
- expect ( item . b ) . to . be . undefined ;
222
+ expect ( item ) . to . not . have . property ( 'b' ) ;
221
223
done ( ) ;
222
224
} ) ;
223
225
} ) ;
@@ -241,8 +243,9 @@ describe('Ignore Undefined', function () {
241
243
242
244
// Locate the doument
243
245
collection . findOne ( ( err , item ) => {
246
+ expect ( err ) . to . not . exist ;
244
247
expect ( item ) . to . have . property ( 'a' , 1 ) ;
245
- expect ( item . b ) . to . be . undefined ;
248
+ expect ( item ) . to . not . have . property ( 'b' ) ;
246
249
done ( ) ;
247
250
} ) ;
248
251
} ) ;
@@ -265,8 +268,9 @@ describe('Ignore Undefined', function () {
265
268
266
269
// Locate the doument
267
270
collection . findOne ( ( err , item ) => {
271
+ expect ( err ) . to . not . exist ;
268
272
expect ( item ) . to . have . property ( 'a' , 1 ) ;
269
- expect ( item . b ) . to . be . undefined ;
273
+ expect ( item ) . to . not . have . property ( 'b' ) ;
270
274
done ( ) ;
271
275
} ) ;
272
276
}
0 commit comments