Skip to content

Commit 0a6f4be

Browse files
committed
add callback to test
1 parent e6eeff5 commit 0a6f4be

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/functional/operation_example.test.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3936,16 +3936,17 @@ describe('Operation Examples', function() {
39363936
// REMOVE-LINE done();
39373937
// REMOVE-LINE var db = client.db(configuration.db);
39383938
// BEGIN
3939+
expect(err).to.not.exist;
39393940
var db = client.db(configuration.db);
3940-
db.createCollection('example');
3941-
test.equal(null, err);
3942-
3943-
// Retry to get the collection, should work as it's now created
3944-
db.collections(function(err, collections) {
3945-
test.equal(null, err);
3946-
test.ok(collections.length > 0);
3941+
db.createCollection('example', err => {
3942+
expect(err).to.not.exist;
3943+
// Retry to get the collection, should work as it's now created
3944+
db.collections(function(err, collections) {
3945+
expect(err).to.not.exist;
3946+
test.ok(collections.length > 0);
39473947

3948-
client.close(done);
3948+
client.close(done);
3949+
});
39493950
});
39503951
});
39513952
// END

0 commit comments

Comments
 (0)