Skip to content

Commit be80be8

Browse files
committed
OnyxUtils.perf-test.ts always the first one
1 parent d37d75c commit be80be8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

jest-sequencer.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ class TestSequencer extends Sequencer {
1414

1515
sort(tests) {
1616
const copyTests = [...tests];
17-
return copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1));
17+
// return copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1));
18+
return copyTests.sort((testA, testB) => {
19+
const isAOnyx = testA.path.includes('OnyxUtils.perf-test.ts');
20+
const isBOnyx = testB.path.includes('OnyxUtils.perf-test.ts');
21+
22+
if (isAOnyx && !isBOnyx) return -1;
23+
if (!isAOnyx && isBOnyx) return 1;
24+
25+
return testA.path.localeCompare(testB.path);
26+
});
1827
}
1928
}
2029

0 commit comments

Comments
 (0)