Skip to content

A platform for community discussion. Free, open, simple.

DEV: Fix testem output (#18609)

Jarek Radoszbdd0a98f38ec
diff --git a/app/assets/javascripts/discourse/testem.js b/app/assets/javascripts/discourse/testem.js
index 1545a94f55a..fbc39514183 100644
--- a/app/assets/javascripts/discourse/testem.js
+++ b/app/assets/javascripts/discourse/testem.js
@@ -18,7 +18,7 @@ class Reporter {
report(prefix, data) {
if (data.failed) {
- this.failReports.push([prefix, data]);
+ this.failReports.push([prefix, data, this._tapReporter.id]);
}
this._tapReporter.report(prefix, data);
}
@@ -28,11 +28,14 @@ class Reporter {
if (this.failReports.length > 0) {
process.stdout.write("\nFailures:\n\n");
- this.failReports.forEach(([prefix, data]) => {
+
+ this.failReports.forEach(([prefix, data, id]) => {
if (process.env.GITHUB_ACTIONS) {
process.stdout.write(`::error ::QUnit Test Failure: ${data.name}\n`);
}
- this.report(prefix, data);
+
+ this._tapReporter.id = id;
+ this._tapReporter.report(prefix, data);
});
}
}