mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
change missing translations log, disable console.log in unit tests
This commit is contained in:
@@ -2,9 +2,6 @@ const fs = require("fs");
|
||||
const path = require("path");
|
||||
const vm = require("vm");
|
||||
|
||||
const mockedWarn = () => {};
|
||||
const originalWarn = console.log;
|
||||
|
||||
beforeAll(function () {
|
||||
const basedir = path.join(__dirname, "../../..");
|
||||
|
||||
@@ -12,8 +9,6 @@ beforeAll(function () {
|
||||
const filePath = path.join(basedir, fileName);
|
||||
const code = fs.readFileSync(filePath);
|
||||
|
||||
console.log = mockedWarn;
|
||||
|
||||
sandbox = {
|
||||
module: {},
|
||||
__dirname: path.dirname(filePath),
|
||||
@@ -33,10 +28,6 @@ beforeAll(function () {
|
||||
vm.runInNewContext(code, sandbox, fileName);
|
||||
});
|
||||
|
||||
afterAll(function () {
|
||||
console.log = originalWarn;
|
||||
});
|
||||
|
||||
describe("'global.root_path' set in js/app.js", function () {
|
||||
const expectedSubPaths = ["modules", "serveronly", "js", "js/app.js", "js/main.js", "js/electron.js", "config"];
|
||||
|
||||
|
Reference in New Issue
Block a user