DEV: ensures click listeners are reset between tests (#13900)

DEV: ensures click listeners are reset between tests (#13900)

diff --git a/app/assets/javascripts/discourse/app/mixins/card-contents-base.js b/app/assets/javascripts/discourse/app/mixins/card-contents-base.js
index 486c5eb..2b036eb 100644
--- a/app/assets/javascripts/discourse/app/mixins/card-contents-base.js
+++ b/app/assets/javascripts/discourse/app/mixins/card-contents-base.js
@@ -8,11 +8,18 @@ import headerOutletHeights from "discourse/lib/header-outlet-height";
 import { inject as service } from "@ember/service";
 import { wantsNewWindow } from "discourse/lib/intercept-click";
 
-let _cardClickListenerSelectors = ["#main-outlet"];
+const DEFAULT_SELECTOR = "#main-outlet";
+
+let _cardClickListenerSelectors = [DEFAULT_SELECTOR];
+
 export function addCardClickListenerSelector(selector) {
   _cardClickListenerSelectors.push(selector);
 }
 
+export function resetCardClickListenerSelector() {
+  _cardClickListenerSelectors = [DEFAULT_SELECTOR];
+}
+
 export default Mixin.create({
   router: service(),
 
diff --git a/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js b/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js
index 4e2b8e3..f0cf909 100644
--- a/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js
+++ b/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js
@@ -36,6 +36,7 @@ import { resetTopicTitleDecorators } from "discourse/components/topic-title";
 import { resetUsernameDecorators } from "discourse/helpers/decorate-username-selector";
 import { resetWidgetCleanCallbacks } from "discourse/components/mount-widget";
 import { resetUserSearchCache } from "discourse/lib/user-search";
+import { resetCardClickListenerSelector } from "discourse/mixins/card-contents-base";
 import sessionFixtures from "discourse/tests/fixtures/session-fixtures";
 import { setTopicList } from "discourse/lib/topic-list-tracker";
 import sinon from "sinon";
@@ -276,6 +277,7 @@ export function acceptance(name, optionsOrCallback) {
       resetOneboxCache();
       resetCustomPostMessageCallbacks();
       resetUserSearchCache();
+      resetCardClickListenerSelector();
       resetPostMenuExtraButtons();
       clearNavItems();
       setTopicList(null);

GitHub sha: 8df48b516fdfb2be05ccc300ff4b247a39bb08c2

This commit appears in #13900 which was approved by markvanlan. It was merged by jjaffeux.