address test suite error didn't get propagated correctly issue #1165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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