From 19540dfa0edd72afb06bb6ee11d31f88554f58c5 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 2 May 2023 14:55:41 +0100 Subject: [PATCH] DEV: Do not include silenced Discourse deprecations in counter (#21336) Silenced Ember deprecations were already being excluded from the test output. This applies the same logic to Discourse deprecations. --- .../discourse/tests/helpers/deprecation-counter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/tests/helpers/deprecation-counter.js b/app/assets/javascripts/discourse/tests/helpers/deprecation-counter.js index 166c7e475a9..29ecfa73e1d 100644 --- a/app/assets/javascripts/discourse/tests/helpers/deprecation-counter.js +++ b/app/assets/javascripts/discourse/tests/helpers/deprecation-counter.js @@ -34,7 +34,11 @@ export default class DeprecationCounter { let { id } = options; id ||= "discourse.(unknown)"; - this.incrementDeprecation(id); + const matchingConfig = this.#configById.get(id); + + if (matchingConfig !== "silence") { + this.incrementDeprecation(id); + } } incrementDeprecation(id) {