diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-02-12 02:57:26 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-11 12:57:26 -0500 |
commit | d26655371b796cf5dad762d1b7154c25251cb41d (patch) | |
tree | 756f7710b86d2678fbdc2434ae1630741c19edc6 /js | |
parent | 90c7af27d7959e94a25f635e21b8d77cb347e135 (diff) |
fix: improve formatting (#1732)
Diffstat (limited to 'js')
-rw-r--r-- | js/console_test.ts | 7 | ||||
-rw-r--r-- | js/repl.ts | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/js/console_test.ts b/js/console_test.ts index f84dc247a..f1a8ca664 100644 --- a/js/console_test.ts +++ b/js/console_test.ts @@ -245,8 +245,11 @@ test(function consoleTestError() { try { throw new MyError("This is an error"); } catch (e) { - assert(stringify(e).split("\n")[3] - .includes("MyError: This is an error")); + assert( + stringify(e) + .split("\n")[3] + .includes("MyError: This is an error") + ); } }); diff --git a/js/repl.ts b/js/repl.ts index 6676721fc..162c6f42f 100644 --- a/js/repl.ts +++ b/js/repl.ts @@ -107,7 +107,8 @@ function evaluate(code: string): void { } else { if (errInfo.isNativeError) { const formattedError = formatError( - libdeno.errorToJSON(errInfo.thrown as Error)); + libdeno.errorToJSON(errInfo.thrown as Error) + ); console.error(formattedError); } else { console.error("Thrown:", errInfo.thrown); |