Skip to content

✨ Add support for route to test CodeLens#143

Draft
savannahostrowski wants to merge 3 commits intomainfrom
route-to-test-nav
Draft

✨ Add support for route to test CodeLens#143
savannahostrowski wants to merge 3 commits intomainfrom
route-to-test-nav

Conversation

@savannahostrowski
Copy link
Copy Markdown
Member

@savannahostrowski savannahostrowski commented Apr 14, 2026

Closes #142
This PR adds support for route to test code navigation via CodeLens (basically the complementary feature to the existing test to route code navigation). Some additional details:

  • No Code Lens will show on a route that has no tests (vs. showing "0 tests", which felt needlessly noisy to me)
  • The design here is such that we scan the workspace on session start but then incrementally invalidate files as a user edits to prevent whole workspace re-scan.
  • This also adds a type field on the property bag for the existing telemetry event that tracks whether we were able to provide a CodeLens.
  • This new feature is bucketed under the existing codeLens.enabled setting. I've opted to not carve out a separate setting for this as I suspect that users who don't want test to route code nav will probably also not want route to test code nav.
  • I extracted findTestClientCalls from TestToRouteCodeLensProvider into extractors.ts so it can be shared with the new test index.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go to Tests code navigation

1 participant