diff options
Diffstat (limited to 'js/console_test.ts')
-rw-r--r-- | js/console_test.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/console_test.ts b/js/console_test.ts index 577c8bf5d..f84dc247a 100644 --- a/js/console_test.ts +++ b/js/console_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import { Console, libdeno, stringifyArgs, inspect, write, stdout } from "deno"; -import { test, assertEqual } from "./test_util.ts"; +import { test, assertEqual, assert } from "./test_util.ts"; const console = new Console(libdeno.print); @@ -245,7 +245,8 @@ test(function consoleTestError() { try { throw new MyError("This is an error"); } catch (e) { - assertEqual(stringify(e).split("\n")[0], "MyError: This is an error"); + assert(stringify(e).split("\n")[3] + .includes("MyError: This is an error")); } }); |