From 498fa2dc8548f4186b13e4cfb63cbd1d2a50ddeb Mon Sep 17 00:00:00 2001 From: John Knox Date: Wed, 16 Oct 2019 01:10:23 -0700 Subject: [PATCH] Fix missing errors from test output Summary: We were losing the first argument of every console.error call during tests. This happens to be useful stuff, like react telling you how to do better testing etc, and explains the weird looking error output from the ConfigField tests. Reviewed By: passy Differential Revision: D17931532 fbshipit-source-id: cfeb834a4646ef68ac55f81a269bcfef7a25ea31 --- static/globalTestSetup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/globalTestSetup.js b/static/globalTestSetup.js index b259b0e7e..27144d80a 100644 --- a/static/globalTestSetup.js +++ b/static/globalTestSetup.js @@ -9,7 +9,7 @@ const defaultConsoleError = console.error; -console.error = function(message, ...args) { +console.error = function(...args) { defaultConsoleError( 'console.error used in a test. This will be an error in the near future.', );