More tests for connectivityReducer()

pull/1451/head
Rick Carlino 2019-09-18 09:27:33 -05:00
parent 96981df093
commit 13bf921d07
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,11 @@ import { connectivityReducer, DEFAULT_STATE } from "../reducer";
import { networkUp, networkDown } from "../actions";
describe("connectivityReducer", () => {
it("ignores `bot.mqtt` because that is handled by PING_OK/PING_NO", () => {
const state = connectivityReducer(DEFAULT_STATE, networkUp("bot.mqtt"));
expect(state).toEqual(DEFAULT_STATE);
});
it("goes up", () => {
const state = connectivityReducer(DEFAULT_STATE,
networkUp("user.mqtt"));