extractPackageTestPath function
Extracts the package-relative file path from a live test and location.
Implementation
String? extractPackageTestPath(dynamic liveTest, dynamic location) {
final uri = _maybe<Uri>(() => location.uri);
if (uri == null) {
final suitePath = _maybe<String>(() => liveTest.suite.path);
if (suitePath == null || suitePath.isEmpty) {
return null;
}
return getRelativePath(suitePath);
}
return packageTestPathFromUri(uri);
}