feat: show tests with .only and .skip modifiers in Test Explorer#36
feat: show tests with .only and .skip modifiers in Test Explorer#36
Conversation
Co-authored-by: mtharrison <916064+mtharrison@users.noreply.github.com>
|
@copilot with this change it.skip still runs, it should not run and should have a separate indicator than the green tick to indicate it is skipped. Ensure text indices are not broken because of this. If runing: We get surprising output: 2 tests marked skipped but only one is skipped |
Tests with .skip modifier are now properly skipped during execution instead of being run. When a test has a .skip modifier, the test runner now: - Marks the test as skipped without executing it - Recursively skips all descendant tests if it's a container (describe/experiment) This prevents the confusing behavior where lab would report tests as skipped even though the extension tried to run them. Co-authored-by: mtharrison <916064+mtharrison@users.noreply.github.com>
Fixed in commit c928cf6. Tests with
This eliminates the confusing output where lab reported "2 skipped" when only 1 test had |
Only recurse into child nodes that have children of their own, avoiding unnecessary function calls on leaf nodes. Co-authored-by: mtharrison <916064+mtharrison@users.noreply.github.com>
Implementation Complete ✅
Successfully implemented support for displaying and properly handling
.onlyand.skiptest modifiers in the VS Code Test Explorer.Changes Made
modifierfield ('only' | 'skip' | undefined)Fix for .skip Tests
Tests with
.skipmodifier are now properly skipped during execution:.skipmodifier before executionVisual Indicators
Tests with modifiers now appear with clear visual indicators:
.onlyshow as "test name (only)" with an "only" tag.skipshow as "test name (skip)" with a "skip" tag and are not executedTesting
Original prompt
it.onlyandit.skiptests disappear from test list #33💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.