-
Notifications
You must be signed in to change notification settings - Fork 78
Description
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:
- Dart SDK tests command to "Go to test" doesn't work as expected Dart-Code/Dart-Code#5480 - original Dart-Code issue
- Test line/col/filenames are incorrect when using package:test_reflective_loader test#2029 - related
pkg:testissue - Allow specifying an explicit location for test/groups test#2481 - change to
pkg:testto support custom test locations