fix: propagate dataset parent status when no testSuiteFinished event is emitted#409
Closed
recca0120 wants to merge 2 commits into
Closed
fix: propagate dataset parent status when no testSuiteFinished event is emitted#409recca0120 wants to merge 2 commits into
recca0120 wants to merge 2 commits into
Conversation
…s) dataset tests Pest v4 emits php_qn:// locationHints pointing to TestCaseFactory.php (eval'd code) instead of the actual test file. The __pest_evaluable__ encoding uses _ for space/ backslash/backtick and __ for literal underscore, with _→_ separating describe segments. - TestIdentifierFactory: route php_qn:// with P\ class prefix to Pest identifier - PestTestIdentifier: handle php_qn:// by extracting classFQN and deriving file path - PestV2Fixer: add decodeEvaluableV4() with FQN heuristic for describe block names
…is emitted When Pest runs dataset tests inside describe() blocks, it emits testStarted/ testFinished events for each dataset child but no testSuiteStarted/testSuiteFinished for the parent test node. This caused the parent icon to remain unchanged even after all children passed or failed. TestResultObserver now tracks completed and failed children. When all tracked children of a parent have finished and no suite event was received for the parent, the parent's status is automatically propagated from its children's results.
Owner
Author
|
Closing - this should be part of #408. The approach also needs rethinking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #404
Root Cause
When Pest runs dataset tests inside
describe()blocks, it emitstestStarted/testFinishedevents for each dataset child, but notestSuiteStarted/testSuiteFinishedfor the parent test node. The parent's icon therefore never updated even after all children passed.Fix
TestResultObservernow tracks child completion state. When all tracked children of a parent have finished (passed/failed/skipped) and no suite event was received for the parent, the parent's status is automatically propagated:passedfailedtestSuiteFinished→ no double-markingTest plan
pnpm -C packages/extension test -- --runpasses (all tests green)describe("something", fn() => it(...)->with([4, 8]))— parent icon updates after children finishtestSuiteStarted/testSuiteFinished) unaffected