change missing translations log, disable console.log in unit tests

This commit is contained in:
Karsten Hassel
2021-06-12 22:17:51 +02:00
parent a5f7c946cc
commit 2af4009a93
5 changed files with 13 additions and 19 deletions

View File

@@ -4,16 +4,11 @@ const vm = require("vm");
const basedir = path.join(__dirname, "../../..");
const mockedWarn = () => {};
const originalWarn = console.log;
beforeAll(function () {
const fileName = "js/app.js";
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("Default modules set in modules/default/defaultmodules.js", function () {
const expectedDefaultModules = require("../../../modules/default/defaultmodules");