chore: use isProjectSetup instead of set (#19285)

This commit is contained in:
Yury Semikhatsky 2022-12-06 08:59:28 -08:00 committed by GitHub
parent 3c1b26b9f1
commit 8660288518
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -283,7 +283,7 @@ export class Runner {
let result = await this._createFilteredRootSuite(options, filesByProject, new Set(), !!setupFiles.size, setupFiles);
if (setupFiles.size) {
const allTests = result.rootSuite.allTests();
const tests = allTests.filter(test => !setupFiles.has(test._requireFile));
const tests = allTests.filter(test => !test._isProjectSetup);
// If >0 tests match and
// - none of the setup files match the filter then we run all setup files,
// - if the filter also matches some of the setup tests, we'll run only
@ -299,7 +299,7 @@ export class Runner {
const projectSetupGroups = [];
const testGroups = [];
for (const group of allTestGroups) {
if (setupFiles.has(group.requireFile))
if (group.isProjectSetup)
projectSetupGroups.push(group);
else
testGroups.push(group);