From dd9ce3407953c02c7b356bb2139295119e697662 Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 19 Dec 2018 19:49:40 +0100 Subject: [PATCH] Updated test --- test/unit/client.test.js | 8 ++++---- test/unit/connection-pool.test.js | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/test/unit/client.test.js b/test/unit/client.test.js index 703a5bcf4..49a71e3fe 100644 --- a/test/unit/client.test.js +++ b/test/unit/client.test.js @@ -260,9 +260,9 @@ test('Client close', t => { t.plan(2) class MyConnectionPool extends ConnectionPool { - empty () { + empty (callback) { t.ok('called') - super.empty() + super.empty(callback) } } @@ -278,9 +278,9 @@ test('Client close (promise)', t => { t.plan(2) class MyConnectionPool extends ConnectionPool { - empty () { + empty (callback) { t.ok('called') - super.empty() + super.empty(callback) } } diff --git a/test/unit/connection-pool.test.js b/test/unit/connection-pool.test.js index 69cd3da00..37a9d3af2 100644 --- a/test/unit/connection-pool.test.js +++ b/test/unit/connection-pool.test.js @@ -240,10 +240,11 @@ test('API', t => { const pool = new ConnectionPool({ Connection }) pool.addConnection('http://localhost:9200/') pool.addConnection('http://localhost:9201/') - pool.empty() - t.strictEqual(pool.connections.size, 0) - t.deepEqual(pool.dead, []) - t.end() + pool.empty(() => { + t.strictEqual(pool.connections.size, 0) + t.deepEqual(pool.dead, []) + t.end() + }) }) t.test('urlToHost', t => {