mirror of
https://github.com/discourse/discourse.git
synced 2025-04-01 02:05:55 +08:00
DEV: Fix testem output (#18609)
Failed tests list we're displaying at the end had incorrect ids. e.g ``` (…) ok 2160 Chrome 106.0 - [54 ms] - Integration | Component | select-kit/category-drop: caretUpIcon ok 2161 Chrome 106.0 - [20 ms] - Unit | Service | store: find embedded Used JS Heap Size: 7.304GB 1..2161 # tests 2161 # pass 2152 # skip 7 # todo 0 # fail 2 Failures: not ok 2162 Chrome 106.0 - [36 ms] - Acceptance: Unknown: Permalink URL to a static page --- actual: > null message: > Promise rejected during "Permalink URL to a static page": no no negative: > false browser log: | ... not ok 2163 Chrome 106.0 - [238 ms] - Unit | Utility | text: parseAsync --- actual: > null message: > Promise rejected during "parseAsync": nope negative: > false browser log: | ... Testem finished with non-zero exit code. Tests failed. ```
This commit is contained in:
parent
7ed87979a2
commit
bdd0a98f38
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user