Update tests for dispatchNetwork(Up|Down)()

pull/1446/head
Rick Carlino 2019-09-18 09:16:19 -05:00
parent bec1cacdba
commit 96981df093
1 changed files with 9 additions and 0 deletions

View File

@ -52,12 +52,21 @@ describe("dispatchNetworkUp", () => {
dispatchNetworkUp("user.mqtt", LONGER_TIME_LATER);
expect(store.dispatch).toHaveBeenLastCalledWith(LATER_UP);
});
it("ignores `bot.mqtt`, now handled by the QoS Ping system", () => {
dispatchNetworkUp("bot.mqtt", 123);
expect(store.dispatch).not.toHaveBeenCalled();
});
});
describe("dispatchNetworkDown", () => {
const NOW_DOWN = networkDown("user.api", NOW.getTime());
const LATER_DOWN = networkDown("user.api", LONGER_TIME_LATER);
beforeEach(resetStats);
it("ignores `bot.mqtt`, now handled by the QoS Ping system", () => {
dispatchNetworkDown("bot.mqtt", 123);
expect(store.dispatch).not.toHaveBeenCalled();
});
it("calls redux directly", () => {
dispatchNetworkDown("user.api", NOW.getTime());