fix(list reporter): populate testIndex

This commit is contained in:
Simon Knott 2024-07-16 16:13:56 +02:00
parent a34f3b9270
commit ef4b5a4121
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -54,11 +54,13 @@ class ListReporter extends BaseReporter {
override onTestBegin(test: TestCase, result: TestResult) {
super.onTestBegin(test, result);
const index = String(this._resultIndex.size + 1);
this._resultIndex.set(result, index);
if (!isTTY)
return;
this._maybeWriteNewLine();
const index = String(this._resultIndex.size + 1);
this._resultIndex.set(result, index);
this._testRows.set(test, this._lastRow);
const prefix = this._testPrefix(index, '');
const line = colors.dim(formatTestTitle(this.config, test)) + this._retrySuffix(result);