1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make unit test more strict

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-turso 2022-05-23 14:18:08 +03:00
parent 5402f64402
commit 1b8b84213d

View File

@ -86,8 +86,8 @@ describe("periodical checking of updates", () => {
expect(processCheckingForUpdatesMock).not.toHaveBeenCalled();
});
it("when enough time passes for checking updates again, still does not check for updates", () => {
jest.advanceTimersByTime(ENOUGH_TIME);
it("when time passes, never checks for updates", () => {
jest.runOnlyPendingTimers();
expect(processCheckingForUpdatesMock).not.toHaveBeenCalled();
});
@ -107,8 +107,8 @@ describe("periodical checking of updates", () => {
expect(processCheckingForUpdatesMock).not.toHaveBeenCalled();
});
it("when enough time passes for checking updates again, still does not check for updates", () => {
jest.advanceTimersByTime(ENOUGH_TIME);
it("when time passes, never checks for updates", () => {
jest.runOnlyPendingTimers();
expect(processCheckingForUpdatesMock).not.toHaveBeenCalled();
});