Add more watchdog tests

This commit is contained in:
Łukasz Mierzwa
2017-07-20 20:02:35 -07:00
parent 3c8be2dbad
commit acc99e4f07

View File

@@ -2,7 +2,7 @@ const watchdog = require("./watchdog");
const moment = require("moment");
test("watchdog init()", () => {
watchdog.init();
watchdog.init(1, 1);
});
test("watchdog getLastUpdate() without pong", () => {
@@ -14,3 +14,7 @@ test("watchdog getLastUpdate() with pong", () => {
watchdog.pong(ts);
expect(watchdog.getLastUpdate()).toBe(ts.utc().unix());
});
test("watchdog isFatal() should be false by default", () => {
expect(watchdog.isFatal()).toBe(false);
});