mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
[ci] Remove jestSequencer
This was previously used for circleci parallelization but is no longer
needed.
ghstack-source-id: d8c1005e09
Pull Request resolved: https://github.com/facebook/react/pull/30500
This commit is contained in:
@@ -24,8 +24,6 @@ module.exports = {
|
||||
},
|
||||
snapshotSerializers: [require.resolve('jest-snapshot-serializer-raw')],
|
||||
|
||||
testSequencer: require.resolve('./jestSequencer'),
|
||||
|
||||
testEnvironment: 'jsdom',
|
||||
|
||||
testRunner: 'jest-circus/runner',
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const Sequencer = require('@jest/test-sequencer').default;
|
||||
|
||||
class CustomSequencer extends Sequencer {
|
||||
sort(tests) {
|
||||
if (process.env.CIRCLE_NODE_TOTAL) {
|
||||
// In CI, parallelize tests across multiple tasks.
|
||||
const nodeTotal = parseInt(process.env.CIRCLE_NODE_TOTAL, 10);
|
||||
const nodeIndex = parseInt(process.env.CIRCLE_NODE_INDEX, 10);
|
||||
tests = tests
|
||||
.sort((a, b) => (a.path < b.path ? -1 : 1))
|
||||
.filter((_, i) => i % nodeTotal === nodeIndex);
|
||||
}
|
||||
return tests;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CustomSequencer;
|
||||
Reference in New Issue
Block a user