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.
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