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

fix(watch): two configs with same testDir #492

Merged
merged 1 commit into from
May 28, 2024

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented May 22, 2024

Repro:

  • two configs, A + B
  • config A has a project enabled
  • config B has no projects enabled
  • config A and B share the same testDir
  • I watch a test

This results in:

  • TestServer.onTestFilesChanged gets emitted twice, from both configs. Since we consider both configs (Models) as enabled:
    for (const model of this._models.enabledModels())
    model.addToWatch(request.include, cancellationToken!);
  • Emitted twice means the test ran twice

Thinking about a test.

@mxschmitt mxschmitt marked this pull request as draft May 23, 2024 11:59
@mxschmitt mxschmitt marked this pull request as ready for review May 23, 2024 15:07
@mxschmitt mxschmitt force-pushed the bugfix/two-config-watch branch from c7925e2 to fa32b80 Compare May 23, 2024 15:12
@mxschmitt mxschmitt marked this pull request as draft May 28, 2024 12:19
@mxschmitt mxschmitt force-pushed the bugfix/two-config-watch branch from fa32b80 to f8f3909 Compare May 28, 2024 12:33
@mxschmitt mxschmitt marked this pull request as ready for review May 28, 2024 12:33
@mxschmitt mxschmitt force-pushed the bugfix/two-config-watch branch from f8f3909 to 5899417 Compare May 28, 2024 12:34
@mxschmitt mxschmitt force-pushed the bugfix/two-config-watch branch from 5899417 to 0354520 Compare May 28, 2024 12:37
@mxschmitt mxschmitt merged commit beddba9 into microsoft:main May 28, 2024
6 checks passed
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