Skip to content

Commit

Permalink
Merge branch 'global_messages' into removals
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCarlino committed Mar 12, 2019
2 parents 40964cb + 60c84a7 commit ffc4c44
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -2,11 +2,12 @@ const on = jest.fn((_e: string, _cb: unknown) => undefined);
const stub = () => Promise.resolve();
const mockBot = {
client: {
subscribe: jest.fn(),
on
},
on,
readStatus: jest.fn(stub),
setUserEnv: stub
setUserEnv: stub,
};

jest.mock("../../../device", () => { return { getDevice: () => mockBot }; });
Expand Down Expand Up @@ -41,6 +42,7 @@ describe("attachEventListeners", () => {
}
});
expect(dev.readStatus).toHaveBeenCalled();
expect(dev.client && dev.client.subscribe).toHaveBeenCalled();
expect(startPinging).toHaveBeenCalledWith(dev);
});
});

0 comments on commit ffc4c44

Please sign in to comment.