jest-community / vscode-jest

The optimal flow for Jest based testing in VS Code
MIT License
2.84k stars 295 forks source link

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

Closed connectdotz closed 3 months ago

connectdotz commented 3 months ago

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 commented 3 months ago

Pull Request Test Coverage Report for Build 10326886764

Details


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

💛 - Coveralls