MagicMirror/tests/e2e/testSequencer.js
Karsten Hassel a2083be76b test order
2021-06-14 00:45:40 +02:00

12 lines
380 B
JavaScript

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;