MagicMirror/tests/e2e/testSequencer.js

12 lines
380 B
JavaScript
Raw Normal View History

2021-06-13 23:06:20 +02:00
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;