From fe1a426fdb86a95dd1cb7b67ba1bd362ad9942db Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 22:39:52 +0100 Subject: [PATCH] f --- packages/reconnect/test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/reconnect/test.js b/packages/reconnect/test.js index af826ac7..27bbff77 100644 --- a/packages/reconnect/test.js +++ b/packages/reconnect/test.js @@ -3,20 +3,21 @@ const _reconnect = require("."); const EventEmitter = require("events"); -test("it schedule a reconnect when disconnect is emitted", () => { - expect.assertions(1); - +test("it schedule a reconnect when disconnect is emitted", (done) => { const entity = new EventEmitter(); const reconnect = _reconnect({ entity }); reconnect.scheduleReconnect = () => { expect.pass(); + done(); }; entity.emit("disconnect"); }); test("#reconnect", async () => { + expect.assertions(3); + const entity = new EventEmitter(); const reconnect = _reconnect({ entity });