Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: extract pool builder, simplify project suite cloning #20235

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

pavelfeldman
Copy link
Member

No description provided.

@pavelfeldman pavelfeldman force-pushed the post_filter branch 2 times, most recently from 75c7fcf to 846127a Compare January 19, 2023 22:06

// Assign test properties with project-specific values.
result.forEachTest((test, suite) => {
suite._fileId = fileId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have an empty suite, we'll never set its _fileId. I wonder whether that's a problem.

import type { FullProjectInternal } from './types';

export function filterTests(suite: Suite, filter: (test: TestCase) => boolean): boolean {
for (const child of suite.suites) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suite.suites = suite.suites.filter(child => filterTests(child, filter));

@pavelfeldman pavelfeldman merged commit fdd62f3 into microsoft:main Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants