fix(tstest): Fix test timing display issue and update TAP protocol documentation

This commit is contained in:
2025-05-23 22:27:12 +00:00
parent 02aeb8195e
commit c48887a820
9 changed files with 1041 additions and 211 deletions

View File

@@ -16,7 +16,7 @@ export class TapParser {
expectedTests: number;
receivedTests: number;
testStatusRegex = /(ok|not\sok)\s([0-9]+)\s-\s(.*)(\s#\s(.*))?$/;
testStatusRegex = /(ok|not\sok)\s([0-9]+)\s-\s(.*?)(\s#\s(.*))?$/;
activeTapTestResult: TapTestResult;
collectingErrorDetails: boolean = false;
currentTestError: string[] = [];
@@ -77,7 +77,7 @@ export class TapParser {
return false;
})();
const testSubject = regexResult[3];
const testSubject = regexResult[3].trim();
const testMetadata = regexResult[5]; // This will be either "time=XXXms" or "SKIP reason" or "TODO reason"
let testDuration = 0;