From 42ddc42c075b0ca2e0a1b22bc95401ad569b7812 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Thu, 26 Jul 2018 18:17:24 -0400 Subject: [PATCH] test(connection): repro #6756 --- test/connection.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/connection.test.js b/test/connection.test.js index d01bbd1ec70..4bc969c8fd7 100644 --- a/test/connection.test.js +++ b/test/connection.test.js @@ -56,6 +56,13 @@ describe('connections:', function() { }).catch(done); }); + it('throws helpful error with legacy syntax (gh-6756)', function(done) { + assert.throws(function() { + mongoose.createConnection('localhost', 'dbname', 27017); + }, /mongoosejs\.com.*connections\.html/); + done(); + }); + it('resolving with q (gh-5714)', function(done) { var bootMongo = Q.defer();