diff --git a/.eslintrc b/.eslintrc index 9172401f408e..2378f95de99e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -32,7 +32,9 @@ "context": false, "global": false, "describes": true, - "allowConsoleError": false + "allowConsoleError": false, + "dontWarnForConsoleError": false, + "warnForConsoleError": false }, "settings": { "jsdoc": { diff --git a/extensions/amp-analytics/0.1/test/test-amp-analytics.js b/extensions/amp-analytics/0.1/test/test-amp-analytics.js index 791b7b9241d1..19f510a6f42a 100644 --- a/extensions/amp-analytics/0.1/test/test-amp-analytics.js +++ b/extensions/amp-analytics/0.1/test/test-amp-analytics.js @@ -77,6 +77,9 @@ describes.realWin('amp-analytics', { }; beforeEach(() => { + // Temporarily disable console error check until we have a solution + // to catch async console errors. + dontWarnForConsoleError(); win = env.win; doc = win.document; ampdoc = env.ampdoc; @@ -116,6 +119,10 @@ describes.realWin('amp-analytics', { }); }); + afterEach(() => { + warnForConsoleError(); + }); + function getAnalyticsTag(config, attrs) { config = JSON.stringify(config); const el = doc.createElement('amp-analytics'); diff --git a/test/_init_tests.js b/test/_init_tests.js index b6ae53ed0309..b9fcd5dc50b9 100644 --- a/test/_init_tests.js +++ b/test/_init_tests.js @@ -52,6 +52,8 @@ let initialWindowState; // All exposed describes. global.describes = describes; +global.dontWarnForConsoleError = dontWarnForConsoleError; +global.warnForConsoleError = warnForConsoleError; // Increase the before/after each timeout since certain times they have timedout // during the normal 2000 allowance.