From b7e6a31a425901c089f4b524774b985906982fae Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Thu, 19 Mar 2020 23:15:21 +0000 Subject: fix(std/http): Fix respond error test on Windows (#4408) --- std/testing/asserts.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'std/testing') diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 1c6dfff19..44c311204 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -348,9 +348,9 @@ export async function assertThrowsAsync( await fn(); } catch (e) { if (ErrorClass && !(Object.getPrototypeOf(e) === ErrorClass.prototype)) { - msg = `Expected error to be instance of "${ErrorClass.name}"${ - msg ? `: ${msg}` : "." - }`; + msg = `Expected error to be instance of "${ErrorClass.name}", but got "${ + e.name + }"${msg ? `: ${msg}` : "."}`; throw new AssertionError(msg); } if (msgIncludes && !e.message.includes(msgIncludes)) { -- cgit v1.2.3