From 7484cf88b5ad0f15ec25e963a2d5947ff6c71463 Mon Sep 17 00:00:00 2001 From: Andy Hayden Date: Sat, 23 Feb 2019 08:24:57 -0800 Subject: Clean up the test failure output (denoland/deno_std#209) Original: https://github.com/denoland/deno_std/commit/e609f0c7cb0e7f5eae11c4f1ab78c01470d04347 --- testing/mod.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'testing') diff --git a/testing/mod.ts b/testing/mod.ts index 45a38919a..3b895a2e9 100644 --- a/testing/mod.ts +++ b/testing/mod.ts @@ -286,7 +286,8 @@ export async function runTests() { // Use setTimeout to avoid the error being ignored due to unhandled // promise rejections being swallowed. setTimeout(() => { - throw new Error(`There were ${failed} test failures.`); + console.error(`There were ${failed} test failures.`); + Deno.exit(1); }, 0); } } -- cgit v1.2.3