Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Commit a41b481

Browse files
committed
chore: Fix driver deprecation warnings
``` (node:39738) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect. ``` and ``` (node:39738) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. ```
1 parent df805e6 commit a41b481

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/fetch.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ describe('fetch()', function() {
2121
before(function(done) {
2222
MongoClient.connect(
2323
'mongodb://localhost:27017/test',
24+
{ useNewUrlParser: true },
2425
function(err, _client) {
2526
assert.ifError(err);
2627
client = _client;
2728
collection = _client.db('test').collection('_test_index_fetch');
28-
collection.ensureIndex({ loc: '2d' }, { w: 1 }, function(err2) {
29+
collection.createIndex({ loc: '2d' }, { w: 1 }, function(err2) {
2930
assert.ifError(err2);
3031
done();
3132
});

0 commit comments

Comments
 (0)