Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp committed Dec 20, 2024
1 parent af84136 commit fe1a426
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/reconnect/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down

0 comments on commit fe1a426

Please sign in to comment.