test order

This commit is contained in:
Karsten Hassel
2021-06-13 23:06:20 +02:00
parent d2fde2bfc8
commit a2083be76b
2 changed files with 17 additions and 4 deletions

View 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;