mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
update tests in updatenotification_spec.js due to problems after merging PR's
This commit is contained in:
parent
91d72e48ad
commit
eb63745664
@ -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
|
||||
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user