From 9e9e8431364fb973c56b67fafb6080c9f66cbbfe Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 11 Jul 2022 21:40:38 +0100 Subject: [PATCH] DEV: Allow use of qunit notrycatch mode (#17433) This is useful when debugging exceptions - when the box is checked, exceptions will be thrown and handled by the browser rather than being absorbed by qunit. This allows developers to intercept the exception and inspect the stack. --- app/assets/javascripts/discourse/tests/setup-tests.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/discourse/tests/setup-tests.js b/app/assets/javascripts/discourse/tests/setup-tests.js index 6d7d0943f4..059d4d53ca 100644 --- a/app/assets/javascripts/discourse/tests/setup-tests.js +++ b/app/assets/javascripts/discourse/tests/setup-tests.js @@ -117,14 +117,9 @@ function createApplication(config, settings) { function setupToolbar() { // Most default toolbar items aren't useful for Discourse QUnit.config.urlConfig = QUnit.config.urlConfig.reject((c) => - [ - "noglobals", - "notrycatch", - "nolint", - "devmode", - "dockcontainer", - "nocontainer", - ].includes(c.id) + ["noglobals", "nolint", "devmode", "dockcontainer", "nocontainer"].includes( + c.id + ) ); QUnit.config.urlConfig.push({