Skip to content

fix(runner): fall back to deepest matching test item when path is incomplete#530

Open
X-Guardian wants to merge 1 commit intoCoderLine:mainfrom
X-Guardian:incomplete-path-fix
Open

fix(runner): fall back to deepest matching test item when path is incomplete#530
X-Guardian wants to merge 1 commit intoCoderLine:mainfrom
X-Guardian:incomplete-path-fix

Conversation

@X-Guardian
Copy link
Copy Markdown

When matching a test by its title path under a compiled file:

  • Before: If any segment didn’t match a child, the walk stopped and nothing was returned for that branch.
  • After: The code tracks the deepest successfully matched test item (deepestMatch). If the full path can’t be followed (e.g. dynamically generated tests), it returns that deepest ancestor instead of failing completely.

An example of the issue that this PR resolves is having ESLint RuleTester objects within a Mocha describe block. If the test is run using the extension, it never marks the describe test as finished.

I also added some unit tests for the runner.ts moodule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant