mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-30 13:09:34 +00:00
test order
This commit is contained in:
parent
d2fde2bfc8
commit
a2083be76b
10
package.json
10
package.json
@ -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 --forceExit",
|
"test": "NODE_ENV=test jest -i",
|
||||||
"test:coverage": "NODE_ENV=test nyc --reporter=lcov --reporter=text jest -i --forceExit",
|
"test:coverage": "NODE_ENV=test nyc --reporter=lcov --reporter=text jest -i",
|
||||||
"test:e2e": "NODE_ENV=test jest --selectProjects e2e -i --forceExit",
|
"test:e2e": "NODE_ENV=test jest --selectProjects e2e -i",
|
||||||
"test:unit": "NODE_ENV=test jest --selectProjects unit -i --forceExit",
|
"test:unit": "NODE_ENV=test jest --selectProjects unit -i",
|
||||||
"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",
|
||||||
@ -93,6 +93,7 @@
|
|||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"verbose": true,
|
"verbose": true,
|
||||||
|
"testSequencer": "<rootDir>/tests/e2e/testSequencer.js",
|
||||||
"projects": [
|
"projects": [
|
||||||
{
|
{
|
||||||
"displayName": "unit",
|
"displayName": "unit",
|
||||||
@ -119,6 +120,7 @@
|
|||||||
],
|
],
|
||||||
"testPathIgnorePatterns": [
|
"testPathIgnorePatterns": [
|
||||||
"<rootDir>/tests/e2e/modules/mocks",
|
"<rootDir>/tests/e2e/modules/mocks",
|
||||||
|
"<rootDir>/tests/e2e/testSequencer.js",
|
||||||
"<rootDir>/tests/e2e/global-setup.js"
|
"<rootDir>/tests/e2e/global-setup.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
11
tests/e2e/testSequencer.js
Normal file
11
tests/e2e/testSequencer.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
const Sequencer = require("@jest/test-sequencer").default;
|
||||||
|
|
||||||
|
class CustomSequencer extends Sequencer {
|
||||||
|
sort(tests) {
|
||||||
|
let copyTests = Array.from(tests);
|
||||||
|
copyTests = copyTests.sort((testA, testB) => (testA.path > testB.path ? -1 : 1));
|
||||||
|
return (copyTests = copyTests.sort((testA, testB) => (testA.path.includes("/modules/") ? 1 : -1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = CustomSequencer;
|
Loading…
x
Reference in New Issue
Block a user