diff --git a/CHANGELOG.md b/CHANGELOG.md index eda2b25e..dbee3b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ _This release is scheduled to be released on 2021-10-01._ - Update weathergov provider to try fetching not just current, but also foreacst, when API URLs available. - Refactored clock layout. - Refactored methods from weatherproviders into weatherobject (isDaytime, updateSunTime). +- Use of `logger.js` in jest tests. ### Fixed diff --git a/tests/unit/functions/updatenotification_spec.js b/tests/unit/functions/updatenotification_spec.js index ff648177..91715c71 100644 --- a/tests/unit/functions/updatenotification_spec.js +++ b/tests/unit/functions/updatenotification_spec.js @@ -2,28 +2,13 @@ const path = require("path"); const git_Helper = require("../../../modules/default/updatenotification/git_helper.js"); const gitHelper = new git_Helper.gitHelper(); gitHelper.add("default"); -let branch = ""; describe("Updatenotification", function () { - // it is assumed that we are at the HEAD of a branch when running this tests - // and we have no foreign modules installed. - - it("should return 0 for repo count", async function () { - const arr = await gitHelper.getRepos(); - expect(arr.length).toBe(0); - }, 15000); - it("should return valid output for git status", async function () { const arr = await gitHelper.getStatus(); expect(arr.length).toBe(1); const gitInfo = arr[0]; - branch = gitInfo.current; expect(gitInfo.current).not.toBe(""); + expect(gitInfo.hash).not.toBe(""); }, 15000); - - it("should return no refs for git fetch", async function () { - const baseDir = path.normalize(__dirname + "/../../../"); - const res = await gitHelper.execShell("cd " + baseDir + " && git fetch --dry-run"); - expect(res.stderr.match(gitHelper.getRefRegex(branch))).toBe(null); - }); });