mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
add jest options
This commit is contained in:
parent
99e5edf2c5
commit
044935a164
@ -10,10 +10,10 @@
|
|||||||
"install": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error",
|
"install": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error",
|
||||||
"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error",
|
"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error",
|
||||||
"postinstall": "npm run install-fonts && echo \"MagicMirror installation finished successfully! \n\"",
|
"postinstall": "npm run install-fonts && echo \"MagicMirror installation finished successfully! \n\"",
|
||||||
"test": "NODE_ENV=test jest -i",
|
"test": "NODE_ENV=test jest -i --silent --forceExit",
|
||||||
"test:coverage": "NODE_ENV=test nyc --reporter=lcov --reporter=text jest -i",
|
"test:coverage": "NODE_ENV=test nyc --reporter=lcov --reporter=text jest -i --silent --forceExit",
|
||||||
"test:e2e": "NODE_ENV=test jest --selectProjects e2e -i",
|
"test:e2e": "NODE_ENV=test jest --selectProjects e2e -i --silent --forceExit",
|
||||||
"test:unit": "NODE_ENV=test jest --selectProjects unit",
|
"test:unit": "NODE_ENV=test jest --selectProjects unit --silent --forceExit",
|
||||||
"test:prettier": "prettier . --check",
|
"test:prettier": "prettier . --check",
|
||||||
"test:js": "eslint js/**/*.js modules/default/**/*.js clientonly/*.js serveronly/*.js translations/*.js vendor/*.js tests/**/*.js config/* --config .eslintrc.json --quiet",
|
"test:js": "eslint js/**/*.js modules/default/**/*.js clientonly/*.js serveronly/*.js translations/*.js vendor/*.js tests/**/*.js config/* --config .eslintrc.json --quiet",
|
||||||
"test:css": "stylelint css/main.css modules/default/**/*.css --config .stylelintrc.json",
|
"test:css": "stylelint css/main.css modules/default/**/*.css --config .stylelintrc.json",
|
||||||
|
@ -16,7 +16,7 @@ exports.getElectronPath = function () {
|
|||||||
return electronPath;
|
return electronPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set timeout - if this is run within Travis, increase timeout
|
// Set timeout - if this is run as CI Job, increase timeout
|
||||||
exports.setupTimeout = function (test) {
|
exports.setupTimeout = function (test) {
|
||||||
if (process.env.CI) {
|
if (process.env.CI) {
|
||||||
jest.setTimeout(30000);
|
jest.setTimeout(30000);
|
||||||
|
@ -13,14 +13,8 @@ beforeAll(function () {
|
|||||||
module: {},
|
module: {},
|
||||||
__dirname: path.dirname(filePath),
|
__dirname: path.dirname(filePath),
|
||||||
global: {},
|
global: {},
|
||||||
console: {
|
|
||||||
log: function () {
|
|
||||||
/*console.log("console.log(", arguments, ")");*/
|
|
||||||
}
|
|
||||||
},
|
|
||||||
process: {
|
process: {
|
||||||
on: function () {
|
on: function () {
|
||||||
/*console.log("process.on called with: ", arguments);*/
|
|
||||||
},
|
},
|
||||||
env: {}
|
env: {}
|
||||||
}
|
}
|
||||||
|
@ -13,14 +13,8 @@ beforeAll(function () {
|
|||||||
module: {},
|
module: {},
|
||||||
__dirname: path.dirname(filePath),
|
__dirname: path.dirname(filePath),
|
||||||
global: {},
|
global: {},
|
||||||
console: {
|
|
||||||
log: function () {
|
|
||||||
/*console.log("console.log(", arguments, ")");*/
|
|
||||||
}
|
|
||||||
},
|
|
||||||
process: {
|
process: {
|
||||||
on: function () {
|
on: function () {
|
||||||
/*console.log("process.on called with: ", arguments);*/
|
|
||||||
},
|
},
|
||||||
env: {}
|
env: {}
|
||||||
}
|
}
|
||||||
@ -35,10 +29,6 @@ beforeAll(function () {
|
|||||||
vm.runInNewContext(code, sandbox, fileName);
|
vm.runInNewContext(code, sandbox, fileName);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(function () {
|
|
||||||
//console.log(global);
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("'global.root_path' set in js/app.js", function () {
|
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"];
|
const expectedSubPaths = ["modules", "serveronly", "js", "js/app.js", "js/main.js", "js/electron.js", "config"];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user