Skip to content

Pass test locations to test/groups #2081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DanTup opened this issue Apr 30, 2025 · 0 comments
Open

Pass test locations to test/groups #2081

DanTup opened this issue Apr 30, 2025 · 0 comments

Comments

@DanTup
Copy link
Contributor

DanTup commented Apr 30, 2025

pkg:test provides the locations of tests in the JSON reporter. We use these in VS Code to provide navigation to tests (and VS Code also shows failure messages inline against those tests).

Those locations are computed by pkg:test by looking at the call stack when group() and test() are called, and then walking up to the first frame from the suite file. For test_reflective_loader this results in all tests being attributed to the calls to defineReflectiveSuite().

I've made a change to pkg:test to support passing custom locations to test/group. Once that's released, pkg:test_reflective_loader can be updated to provide those locations when it calls group/test.

I'm happy to make this change once pkg:test rolls out, I'm just recording the issue here in the meantime.

Related:

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

No branches or pull requests

1 participant