From 8e8f936e40ec29f2d64bf05e78475ee20fe84de9 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 7 Jun 2019 00:27:55 +1000 Subject: [PATCH] Remove console.error from asserts. (denoland/deno_std#483) Original: https://github.com/denoland/deno_std/commit/2292fbe6b1935588e19bc2736b364e82b7c5d38e --- testing/asserts.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/testing/asserts.ts b/testing/asserts.ts index cbdaf3a944..904a4a9667 100644 --- a/testing/asserts.ts +++ b/testing/asserts.ts @@ -104,12 +104,6 @@ export function assertNotEquals( } catch (e) { expectedString = "[Cannot display]"; } - console.error( - "Not Equals failed. actual =", - actualString, - "expected =", - expectedString - ); if (!msg) { msg = `actual: ${actualString} expected: ${expectedString}`; } @@ -138,12 +132,6 @@ export function assertStrictEq( } catch (e) { expectedString = "[Cannot display]"; } - console.error( - "strictEqual failed. actual =", - actualString, - "expected =", - expectedString - ); if (!msg) { msg = `actual: ${actualString} expected: ${expectedString}`; } @@ -161,12 +149,6 @@ export function assertStrContains( msg?: string ): void { if (!actual.includes(expected)) { - console.error( - "stringContains failed. actual =", - actual, - "not containing ", - expected - ); if (!msg) { msg = `actual: "${actual}" expected to contains: "${expected}"`; } @@ -199,12 +181,6 @@ export function assertArrayContains( if (missing.length === 0) { return; } - console.error( - "assertArrayContains failed. actual=", - actual, - "not containing ", - expected - ); if (!msg) { msg = `actual: "${actual}" expected to contains: "${expected}"`; msg += "\n"; @@ -223,12 +199,6 @@ export function assertMatch( msg?: string ): void { if (!expected.test(actual)) { - console.error( - "stringMatching failed. actual =", - actual, - "not matching RegExp ", - expected - ); if (!msg) { msg = `actual: "${actual}" expected to match: "${expected}"`; }