mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Merge pull request #2655 from khassel/logger
change use of logger.js in jest tests
This commit is contained in:
commit
c3fc745c7e
@ -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.
|
- Update weathergov provider to try fetching not just current, but also foreacst, when API URLs available.
|
||||||
- Refactored clock layout.
|
- Refactored clock layout.
|
||||||
- Refactored methods from weatherproviders into weatherobject (isDaytime, updateSunTime).
|
- Refactored methods from weatherproviders into weatherobject (isDaytime, updateSunTime).
|
||||||
|
- Use of `logger.js` in jest tests.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
root.Log = factory(root.config);
|
root.Log = factory(root.config);
|
||||||
}
|
}
|
||||||
})(this, function (config) {
|
})(this, function (config) {
|
||||||
const logLevel = {
|
let logLevel = {
|
||||||
debug: Function.prototype.bind.call(console.debug, console),
|
debug: Function.prototype.bind.call(console.debug, console),
|
||||||
log: Function.prototype.bind.call(console.log, console),
|
log: Function.prototype.bind.call(console.log, console),
|
||||||
info: Function.prototype.bind.call(console.info, console),
|
info: Function.prototype.bind.call(console.info, console),
|
||||||
@ -32,10 +32,13 @@
|
|||||||
groupCollapsed: Function.prototype.bind.call(console.groupCollapsed, console),
|
groupCollapsed: Function.prototype.bind.call(console.groupCollapsed, console),
|
||||||
groupEnd: Function.prototype.bind.call(console.groupEnd, console),
|
groupEnd: Function.prototype.bind.call(console.groupEnd, console),
|
||||||
time: Function.prototype.bind.call(console.time, console),
|
time: Function.prototype.bind.call(console.time, console),
|
||||||
timeEnd: Function.prototype.bind.call(console.timeEnd, console),
|
timeEnd: Function.prototype.bind.call(console.timeEnd, console)
|
||||||
timeStamp: Function.prototype.bind.call(console.timeStamp, console)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ((typeof exports === "object" && process.env.JEST_WORKER_ID === undefined) || typeof exports !== "object") {
|
||||||
|
logLevel.timeStamp = Function.prototype.bind.call(console.timeStamp, console);
|
||||||
|
}
|
||||||
|
|
||||||
logLevel.setLogLevel = function (newLevel) {
|
logLevel.setLogLevel = function (newLevel) {
|
||||||
if (newLevel) {
|
if (newLevel) {
|
||||||
Object.keys(logLevel).forEach(function (key, index) {
|
Object.keys(logLevel).forEach(function (key, index) {
|
||||||
|
@ -2,17 +2,12 @@ const util = require("util");
|
|||||||
const exec = util.promisify(require("child_process").exec);
|
const exec = util.promisify(require("child_process").exec);
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const Log = require("logger");
|
||||||
|
|
||||||
class gitHelper {
|
class gitHelper {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.gitRepos = [];
|
this.gitRepos = [];
|
||||||
this.baseDir = path.normalize(__dirname + "/../../../");
|
this.baseDir = path.normalize(__dirname + "/../../../");
|
||||||
if (process.env.JEST_WORKER_ID === undefined) {
|
|
||||||
this.Log = require("logger");
|
|
||||||
} else {
|
|
||||||
// if we are running with jest
|
|
||||||
this.Log = require("../../../tests/unit/mocks/logger.js");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getRefRegex(branch) {
|
getRefRegex(branch) {
|
||||||
@ -31,7 +26,7 @@ class gitHelper {
|
|||||||
async isGitRepo(moduleFolder) {
|
async isGitRepo(moduleFolder) {
|
||||||
let res = await this.execShell("cd " + moduleFolder + " && git remote -v");
|
let res = await this.execShell("cd " + moduleFolder + " && git remote -v");
|
||||||
if (res.stderr) {
|
if (res.stderr) {
|
||||||
this.Log.error("Failed to fetch git data for " + moduleFolder + ": " + res.stderr);
|
Log.error("Failed to fetch git data for " + moduleFolder + ": " + res.stderr);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
@ -44,7 +39,7 @@ class gitHelper {
|
|||||||
moduleFolder = moduleFolder + "modules/" + moduleName;
|
moduleFolder = moduleFolder + "modules/" + moduleName;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.Log.info("Checking git for module: " + moduleName);
|
Log.info("Checking git for module: " + moduleName);
|
||||||
// Throws error if file doesn't exist
|
// Throws error if file doesn't exist
|
||||||
fs.statSync(path.join(moduleFolder, ".git"));
|
fs.statSync(path.join(moduleFolder, ".git"));
|
||||||
// Fetch the git or throw error if no remotes
|
// Fetch the git or throw error if no remotes
|
||||||
@ -76,13 +71,13 @@ class gitHelper {
|
|||||||
// the hash is only needed for the mm repo
|
// the hash is only needed for the mm repo
|
||||||
res = await this.execShell("cd " + repo.folder + " && git rev-parse HEAD");
|
res = await this.execShell("cd " + repo.folder + " && git rev-parse HEAD");
|
||||||
if (res.stderr) {
|
if (res.stderr) {
|
||||||
this.Log.error("Failed to get current commit hash for " + repo.module + ": " + res.stderr);
|
Log.error("Failed to get current commit hash for " + repo.module + ": " + res.stderr);
|
||||||
}
|
}
|
||||||
gitInfo.hash = res.stdout;
|
gitInfo.hash = res.stdout;
|
||||||
}
|
}
|
||||||
res = await this.execShell("cd " + repo.folder + " && git status -sb");
|
res = await this.execShell("cd " + repo.folder + " && git status -sb");
|
||||||
if (res.stderr) {
|
if (res.stderr) {
|
||||||
this.Log.error("Failed to get git status for " + repo.module + ": " + res.stderr);
|
Log.error("Failed to get git status for " + repo.module + ": " + res.stderr);
|
||||||
// exit without git status info
|
// exit without git status info
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
40
package-lock.json
generated
40
package-lock.json
generated
@ -21,7 +21,7 @@
|
|||||||
"iconv-lite": "^0.6.3",
|
"iconv-lite": "^0.6.3",
|
||||||
"module-alias": "^2.2.2",
|
"module-alias": "^2.2.2",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.2",
|
||||||
"node-ical": "^0.13.0",
|
"node-ical": "^0.13.0",
|
||||||
"socket.io": "^4.2.0"
|
"socket.io": "^4.2.0"
|
||||||
},
|
},
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"jsdom": "^17.0.0",
|
"jsdom": "^17.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.4.0",
|
||||||
"pretty-quick": "^3.1.1",
|
"pretty-quick": "^3.1.1",
|
||||||
"sinon": "^11.1.2",
|
"sinon": "^11.1.2",
|
||||||
"spectron": "^15.0.0",
|
"spectron": "^15.0.0",
|
||||||
@ -6948,9 +6948,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/node-fetch": {
|
"node_modules/node-fetch": {
|
||||||
"version": "2.6.1",
|
"version": "2.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.2.tgz",
|
||||||
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
|
"integrity": "sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "4.x || >=6.0.0"
|
"node": "4.x || >=6.0.0"
|
||||||
}
|
}
|
||||||
@ -7741,9 +7741,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "2.3.2",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz",
|
||||||
"integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==",
|
"integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "bin-prettier.js"
|
"prettier": "bin-prettier.js"
|
||||||
@ -8789,9 +8789,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/source-map-support": {
|
"node_modules/source-map-support": {
|
||||||
"version": "0.5.19",
|
"version": "0.5.20",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz",
|
||||||
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
|
"integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"buffer-from": "^1.0.0",
|
"buffer-from": "^1.0.0",
|
||||||
@ -15827,9 +15827,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node-fetch": {
|
"node-fetch": {
|
||||||
"version": "2.6.1",
|
"version": "2.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.2.tgz",
|
||||||
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
"integrity": "sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA=="
|
||||||
},
|
},
|
||||||
"node-ical": {
|
"node-ical": {
|
||||||
"version": "0.13.0",
|
"version": "0.13.0",
|
||||||
@ -16440,9 +16440,9 @@
|
|||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "2.3.2",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz",
|
||||||
"integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==",
|
"integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier-linter-helpers": {
|
"prettier-linter-helpers": {
|
||||||
@ -17243,9 +17243,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"source-map-support": {
|
"source-map-support": {
|
||||||
"version": "0.5.19",
|
"version": "0.5.20",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz",
|
||||||
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
|
"integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"buffer-from": "^1.0.0",
|
"buffer-from": "^1.0.0",
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
"jsdom": "^17.0.0",
|
"jsdom": "^17.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.4.0",
|
||||||
"pretty-quick": "^3.1.1",
|
"pretty-quick": "^3.1.1",
|
||||||
"sinon": "^11.1.2",
|
"sinon": "^11.1.2",
|
||||||
"spectron": "^15.0.0",
|
"spectron": "^15.0.0",
|
||||||
@ -80,7 +80,7 @@
|
|||||||
"iconv-lite": "^0.6.3",
|
"iconv-lite": "^0.6.3",
|
||||||
"module-alias": "^2.2.2",
|
"module-alias": "^2.2.2",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.2",
|
||||||
"node-ical": "^0.13.0",
|
"node-ical": "^0.13.0",
|
||||||
"socket.io": "^4.2.0"
|
"socket.io": "^4.2.0"
|
||||||
},
|
},
|
||||||
@ -96,6 +96,9 @@
|
|||||||
"projects": [
|
"projects": [
|
||||||
{
|
{
|
||||||
"displayName": "unit",
|
"displayName": "unit",
|
||||||
|
"moduleNameMapper": {
|
||||||
|
"logger": "<rootDir>/js/logger.js"
|
||||||
|
},
|
||||||
"testMatch": [
|
"testMatch": [
|
||||||
"**/tests/unit/**/*.[jt]s?(x)"
|
"**/tests/unit/**/*.[jt]s?(x)"
|
||||||
],
|
],
|
||||||
|
@ -2,28 +2,13 @@ const path = require("path");
|
|||||||
const git_Helper = require("../../../modules/default/updatenotification/git_helper.js");
|
const git_Helper = require("../../../modules/default/updatenotification/git_helper.js");
|
||||||
const gitHelper = new git_Helper.gitHelper();
|
const gitHelper = new git_Helper.gitHelper();
|
||||||
gitHelper.add("default");
|
gitHelper.add("default");
|
||||||
let branch = "";
|
|
||||||
|
|
||||||
describe("Updatenotification", function () {
|
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 () {
|
it("should return valid output for git status", async function () {
|
||||||
const arr = await gitHelper.getStatus();
|
const arr = await gitHelper.getStatus();
|
||||||
expect(arr.length).toBe(1);
|
expect(arr.length).toBe(1);
|
||||||
const gitInfo = arr[0];
|
const gitInfo = arr[0];
|
||||||
branch = gitInfo.current;
|
|
||||||
expect(gitInfo.current).not.toBe("");
|
expect(gitInfo.current).not.toBe("");
|
||||||
|
expect(gitInfo.hash).not.toBe("");
|
||||||
}, 15000);
|
}, 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);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@ -1,49 +1,14 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const vm = require("vm");
|
|
||||||
|
|
||||||
const basedir = path.join(__dirname, "../../..");
|
const root_path = path.join(__dirname, "../../..");
|
||||||
|
|
||||||
describe("Default modules set in modules/default/defaultmodules.js", function () {
|
describe("Default modules set in modules/default/defaultmodules.js", function () {
|
||||||
let sandbox = null;
|
|
||||||
|
|
||||||
beforeAll(function () {
|
|
||||||
const fileName = "js/app.js";
|
|
||||||
const filePath = path.join(basedir, fileName);
|
|
||||||
const code = fs.readFileSync(filePath);
|
|
||||||
|
|
||||||
sandbox = {
|
|
||||||
module: {},
|
|
||||||
__dirname: path.dirname(filePath),
|
|
||||||
global: {},
|
|
||||||
process: {
|
|
||||||
on: function () {},
|
|
||||||
env: {}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
sandbox.require = function (filename) {
|
|
||||||
// This modifies the global slightly,
|
|
||||||
// but supplies vm with essential code
|
|
||||||
if (filename === "logger") {
|
|
||||||
return require("../mocks/logger.js");
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return require(filename);
|
|
||||||
} catch (ignore) {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.runInNewContext(code, sandbox, fileName);
|
|
||||||
});
|
|
||||||
|
|
||||||
const expectedDefaultModules = require("../../../modules/default/defaultmodules");
|
const expectedDefaultModules = require("../../../modules/default/defaultmodules");
|
||||||
|
|
||||||
for (const defaultModule of expectedDefaultModules) {
|
for (const defaultModule of expectedDefaultModules) {
|
||||||
it(`contains a folder for modules/default/${defaultModule}"`, function () {
|
it(`contains a folder for modules/default/${defaultModule}"`, function () {
|
||||||
expect(fs.existsSync(path.join(sandbox.global.root_path, "modules/default", defaultModule))).toBe(true);
|
expect(fs.existsSync(path.join(root_path, "modules/default", defaultModule))).toBe(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,49 +1,15 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const vm = require("vm");
|
|
||||||
|
const root_path = path.join(__dirname, "../../..");
|
||||||
|
const version = require(`${__dirname}/../../../package.json`).version;
|
||||||
|
|
||||||
describe("'global.root_path' set in js/app.js", function () {
|
describe("'global.root_path' set in js/app.js", function () {
|
||||||
let sandbox = null;
|
|
||||||
|
|
||||||
beforeAll(function () {
|
|
||||||
const basedir = path.join(__dirname, "../../..");
|
|
||||||
|
|
||||||
const fileName = "js/app.js";
|
|
||||||
const filePath = path.join(basedir, fileName);
|
|
||||||
const code = fs.readFileSync(filePath);
|
|
||||||
|
|
||||||
sandbox = {
|
|
||||||
module: {},
|
|
||||||
__dirname: path.dirname(filePath),
|
|
||||||
global: {},
|
|
||||||
process: {
|
|
||||||
on: function () {},
|
|
||||||
env: {}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
sandbox.require = function (filename) {
|
|
||||||
// This modifies the global slightly,
|
|
||||||
// but supplies vm with essential code
|
|
||||||
if (filename === "logger") {
|
|
||||||
return require("../mocks/logger.js");
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return require(filename);
|
|
||||||
} catch (ignore) {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.runInNewContext(code, sandbox, fileName);
|
|
||||||
});
|
|
||||||
|
|
||||||
const expectedSubPaths = ["modules", "serveronly", "js", "js/app.js", "js/main.js", "js/electron.js", "config"];
|
const expectedSubPaths = ["modules", "serveronly", "js", "js/app.js", "js/main.js", "js/electron.js", "config"];
|
||||||
|
|
||||||
expectedSubPaths.forEach((subpath) => {
|
expectedSubPaths.forEach((subpath) => {
|
||||||
it(`contains a file/folder "${subpath}"`, function () {
|
it(`contains a file/folder "${subpath}"`, function () {
|
||||||
expect(fs.existsSync(path.join(sandbox.global.root_path, subpath))).toBe(true);
|
expect(fs.existsSync(path.join(root_path, subpath))).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -57,6 +23,6 @@ describe("'global.root_path' set in js/app.js", function () {
|
|||||||
|
|
||||||
it("should expect the global.version equals package.json file", function () {
|
it("should expect the global.version equals package.json file", function () {
|
||||||
const versionPackage = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
|
const versionPackage = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
|
||||||
expect(sandbox.global.version).toBe(versionPackage);
|
expect(version).toBe(versionPackage);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
(function (root, factory) {
|
|
||||||
// Node, CommonJS-like
|
|
||||||
module.exports = factory(root.config);
|
|
||||||
})(this, function (config) {
|
|
||||||
let logLevel = {
|
|
||||||
debug: function () {},
|
|
||||||
log: function () {},
|
|
||||||
info: function () {},
|
|
||||||
warn: function () {},
|
|
||||||
error: function () {},
|
|
||||||
group: function () {},
|
|
||||||
groupCollapsed: function () {},
|
|
||||||
groupEnd: function () {},
|
|
||||||
time: function () {},
|
|
||||||
timeEnd: function () {},
|
|
||||||
timeStamp: function () {}
|
|
||||||
};
|
|
||||||
|
|
||||||
return logLevel;
|
|
||||||
});
|
|
Loading…
x
Reference in New Issue
Block a user