mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +00:00
remove chai from unit tests
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const expect = require("chai").expect;
|
||||
const vm = require("vm");
|
||||
|
||||
beforeAll(function () {
|
||||
@@ -45,20 +44,20 @@ describe("'global.root_path' set in js/app.js", function () {
|
||||
|
||||
expectedSubPaths.forEach((subpath) => {
|
||||
it(`contains a file/folder "${subpath}"`, function () {
|
||||
expect(fs.existsSync(path.join(sandbox.global.root_path, subpath))).to.equal(true);
|
||||
expect(fs.existsSync(path.join(sandbox.global.root_path, subpath))).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
it("should not modify global.root_path for testing", function () {
|
||||
expect(global.root_path).to.equal(undefined);
|
||||
expect(global.root_path).toBe(undefined);
|
||||
});
|
||||
|
||||
it("should not modify global.version for testing", function () {
|
||||
expect(global.version).to.equal(undefined);
|
||||
expect(global.version).toBe(undefined);
|
||||
});
|
||||
|
||||
it("should expect the global.version equals package.json file", function () {
|
||||
const versionPackage = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
|
||||
expect(sandbox.global.version).to.equal(versionPackage);
|
||||
expect(sandbox.global.version).toBe(versionPackage);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user