Skip to content

Commit

Permalink
test: remove testing for "q"
Browse files Browse the repository at this point in the history
"q" has been deprecated and superseded by js native Promise.
  • Loading branch information
hasezoey committed Jan 9, 2025
1 parent 032aa1c commit 0996b2b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"ncp": "^2.0.0",
"nyc": "15.1.0",
"pug": "3.0.3",
"q": "1.5.1",
"sinon": "19.0.2",
"stream-browserify": "3.0.0",
"tsd": "0.31.2",
Expand Down
15 changes: 0 additions & 15 deletions test/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
const start = require('./common');

const STATES = require('../lib/connectionState');
const Q = require('q');
const assert = require('assert');
const mongodb = require('mongodb');
const MongooseError = require('../lib/error/index');
Expand Down Expand Up @@ -119,20 +118,6 @@ describe('connections:', function() {
}, /string.*createConnection/);
});

it('resolving with q (gh-5714)', async function() {
const bootMongo = Q.defer();

const conn = mongoose.createConnection(start.uri);

conn.on('connected', function() {
bootMongo.resolve(this);
});

const _conn = await bootMongo.promise;
assert.equal(_conn, conn);
await conn.close();
});

it('connection plugins (gh-7378)', async function() {
const conn1 = mongoose.createConnection(start.uri);
const conn2 = mongoose.createConnection(start.uri);
Expand Down

0 comments on commit 0996b2b

Please sign in to comment.