DEV: Reduce console noise in qunit tests (#36044)

1. Patch node deprecation in http-proxy
2. Disable Discourse/Ember version logging in qunit tests
3. Disable memory-use reporting, but keep code so it can be re-enabled
when debugging
This commit is contained in:
David Taylor
2025-11-14 15:55:09 +00:00
committed by GitHub
parent 1417b9828d
commit 9c36c7bf93
5 changed files with 36 additions and 5 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ function resolveDiscourseInitializer(moduleName, themeId) {
let printedDebugInfo = false;
function printDebugInfo() {
if (printedDebugInfo) {
if (printedDebugInfo || isTesting()) {
return;
}
+4
View File
@@ -53,6 +53,7 @@ import { loadSprites } from "../lib/svg-sprite-loader";
import * as FakerModule from "@faker-js/faker";
import { setLoadedFaker } from "discourse/lib/load-faker";
const REPORT_MEMORY = false;
let cancelled = false;
let started = false;
@@ -186,6 +187,9 @@ function setupToolbar() {
}
function reportMemoryUsageAfterTests() {
if (!REPORT_MEMORY) {
return;
}
QUnit.done(() => {
const usageBytes = performance.memory?.usedJSHeapSize;
let result;
+2 -1
View File
@@ -64,7 +64,8 @@
"virtual-dom@2.1.1": "patches/virtual-dom@2.1.1.patch",
"licensee@11.1.1": "patches/licensee@11.1.1.patch",
"@ember-compat/tracked-built-ins@0.9.1": "patches/@ember-compat__tracked-built-ins@0.9.1.patch",
"ember-source@6.6.0": "patches/ember-source@6.6.0.patch"
"ember-source@6.6.0": "patches/ember-source@6.6.0.patch",
"http-proxy@1.18.1": "patches/http-proxy@1.18.1.patch"
},
"peerDependencyRules": {
"allowedVersions": {
+23
View File
@@ -0,0 +1,23 @@
diff --git a/lib/http-proxy/common.js b/lib/http-proxy/common.js
index 6513e81d80d5250ea249ea833f819ece67897c7e..0555e80e25b8c4f4f21281e38c4c04069009dc0c 100644
--- a/lib/http-proxy/common.js
+++ b/lib/http-proxy/common.js
@@ -1,6 +1,6 @@
var common = exports,
url = require('url'),
- extend = require('util')._extend,
+ extend = Object.assign,
required = require('requires-port');
var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i,
diff --git a/lib/http-proxy/index.js b/lib/http-proxy/index.js
index 977a4b3622b9eaac27689f06347ea4c5173a96cd..739409c0dd0b93149fd174f4b085c3fbb522bf75 100644
--- a/lib/http-proxy/index.js
+++ b/lib/http-proxy/index.js
@@ -1,5 +1,5 @@
var httpProxy = module.exports,
- extend = require('util')._extend,
+ extend = Object.assign,
parse_url = require('url').parse,
EE3 = require('eventemitter3'),
http = require('http'),
+6 -3
View File
@@ -20,6 +20,9 @@ patchedDependencies:
ember-this-fallback@0.4.0:
hash: znalyv6akdxlqfpmxunrdi3osa
path: patches/ember-this-fallback@0.4.0.patch
http-proxy@1.18.1:
hash: ymp5amxobtv5gnuhukua2wla6y
path: patches/http-proxy@1.18.1.patch
licensee@11.1.1:
hash: 55h346kvblvnigtrwrsh4hpona
path: patches/licensee@11.1.1.patch
@@ -13814,7 +13817,7 @@ snapshots:
heimdalljs-fs-monitor: 1.1.2
heimdalljs-graph: 1.0.0
heimdalljs-logger: 0.1.10
http-proxy: 1.18.1
http-proxy: 1.18.1(patch_hash=ymp5amxobtv5gnuhukua2wla6y)
inflection: 2.0.1
inquirer: 9.3.8(@types/node@24.9.2)
is-git-url: 1.0.0
@@ -15501,7 +15504,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
http-proxy@1.18.1:
http-proxy@1.18.1(patch_hash=ymp5amxobtv5gnuhukua2wla6y):
dependencies:
eventemitter3: 4.0.7
follow-redirects: 1.15.11
@@ -18609,7 +18612,7 @@ snapshots:
express: 4.21.2
fireworm: 0.7.2
glob: 7.2.3
http-proxy: 1.18.1
http-proxy: 1.18.1(patch_hash=ymp5amxobtv5gnuhukua2wla6y)
js-yaml: 3.14.1
lodash: 4.17.21
mkdirp: 3.0.1