Skip to content

Commit

Permalink
Canonicalize URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
natebosch committed Jun 16, 2023
1 parent 90e4f67 commit 341c0aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/test_core/lib/src/runner/reporter/json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ class JsonReporter implements Reporter {
/// all be `null`.
Map<String, dynamic> _frameInfo(SuiteConfiguration suiteConfig, Trace? trace,
Runtime runtime, String suitePath) {
var absoluteSuitePath = p.absolute(suitePath);
var absoluteSuitePath = p.canonicalize(p.absolute(suitePath));
var frame = trace?.frames.first;
if (frame == null || (suiteConfig.jsTrace && runtime.isJS)) {
return {'line': null, 'column': null, 'url': null};
}

var rootFrame = trace?.frames.firstWhereOrNull((frame) =>
frame.uri.scheme == 'file' &&
frame.uri.toFilePath() == absoluteSuitePath);
p.canonicalize(frame.uri.toFilePath()) == absoluteSuitePath);
return {
'line': frame.line,
'column': frame.column,
Expand Down

0 comments on commit 341c0aa

Please sign in to comment.