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

address test suite error didn't get propagated correctly issue #1165

Merged

Conversation

connectdotz
Copy link
Collaborator

@connectdotz connectdotz commented Aug 9, 2024

Motivation

As highlighted in issue #1098, when the test suite fails to run—often due to compile or dependency errors—explicit assertions for each test are not generated. Despite removing these test items, their states are not cleared in VSCode. Consequently, when tests are re-added by the source code parser, they display a previously cached status, which might be inaccurate.

Implementation Summary

This PR introduces code that propagates the test suite results to all existing child items (if any) before removing them. This ensures that the cached results are accurate if the test items are reinstated later.

TODO

Ideally, we would mark these child test items as "unknown" since they haven't run due to non-test-related issues. However, VSCode currently lacks an API to support this functionality (see request at microsoft/vscode#206139). As a workaround, we propagate the test suite's status to the child items. We should revisit and update the implementation once the requested API is available.


resolve #1098

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10326886764

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 98.175%

Totals Coverage Status
Change from base Build 10307976179: 0.003%
Covered Lines: 4091
Relevant Lines: 4097

💛 - Coveralls

@connectdotz connectdotz merged commit 01191b8 into jest-community:master Aug 12, 2024
11 checks passed
@connectdotz connectdotz deleted the test-suite-error-improvement branch August 12, 2024 21:11
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.

Show tests that fail to run as failed
2 participants