From 164af898c43d71840e46d6c5530aae898337ef0e Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 29 Jul 2024 12:55:38 -0400 Subject: [PATCH] [ci] Remove jestSequencer This was previously used for circleci parallelization but is no longer needed. ghstack-source-id: d8c1005e0955310b0ae10111459e0b51d4176b69 Pull Request resolved: https://github.com/facebook/react/pull/30500 --- scripts/jest/config.base.js | 2 -- scripts/jest/jestSequencer.js | 19 ------------------- 2 files changed, 21 deletions(-) delete mode 100644 scripts/jest/jestSequencer.js diff --git a/scripts/jest/config.base.js b/scripts/jest/config.base.js index a887e66b7dd3c..263010a87b451 100644 --- a/scripts/jest/config.base.js +++ b/scripts/jest/config.base.js @@ -24,8 +24,6 @@ module.exports = { }, snapshotSerializers: [require.resolve('jest-snapshot-serializer-raw')], - testSequencer: require.resolve('./jestSequencer'), - testEnvironment: 'jsdom', testRunner: 'jest-circus/runner', diff --git a/scripts/jest/jestSequencer.js b/scripts/jest/jestSequencer.js deleted file mode 100644 index b21cbbfc0ccbc..0000000000000 --- a/scripts/jest/jestSequencer.js +++ /dev/null @@ -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;