From 000173c13204b2a17ed01e4b345da2ade95440fe Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 11 Aug 2021 16:14:17 -0700 Subject: [PATCH] Reformat --- lib/src/node.dart | 10 +++++----- test/node_api/importer_test.dart | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/src/node.dart b/lib/src/node.dart index 709b2a3fe..96f1719b0 100644 --- a/lib/src/node.dart +++ b/lib/src/node.dart @@ -187,11 +187,11 @@ JsError _wrapException(Object exception) { var url = exception.span.sourceUrl; if (url == null) { file = 'stdin'; - } else if (url.scheme == 'file') { - file = p.fromUri(url); - } else { - file = url.toString(); - } + } else if (url.scheme == 'file') { + file = p.fromUri(url); + } else { + file = url.toString(); + } return _newRenderError(exception.toString().replaceFirst("Error: ", ""), line: exception.span.start.line + 1, diff --git a/test/node_api/importer_test.dart b/test/node_api/importer_test.dart index f36142e7e..260ae42d9 100644 --- a/test/node_api/importer_test.dart +++ b/test/node_api/importer_test.dart @@ -706,14 +706,14 @@ void main() { }); test("it occurs in a file with a custom URL scheme", () { - var error = - renderSyncError(RenderOptions( - data: "@import 'foo:bar'", - importer: allowInterop(expectAsync2((String _, void __) { - return NodeImporterResult(contents: '@error "oh no";'); + var error = renderSyncError(RenderOptions( + data: "@import 'foo:bar'", + importer: allowInterop(expectAsync2((String _, void __) { + return NodeImporterResult(contents: '@error "oh no";'); })))); - expect(error, + expect( + error, toStringAndMessageEqual("\"oh no\"\n" " ╷\n" "1 │ @error \"oh no\";\n"