mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-10 15:09:00 +02:00
fix(test-runner): strip GHA ::group:: wrappers before file attribution
On GitHub Actions bun wraps each file's log section in ::group::. The un-stripped header failed FILE_HEADER_RE, failures attributed to the PREVIOUS file, and the terminal recap's re-printed (fail) lines landed under a phantom second file — the first Linux run reported 5 real failures as 10 across 2 files (one of them innocent). Strip the prefix before matching; the existing file+test dedupe then absorbs the recap.
This commit is contained in:
@@ -638,7 +638,12 @@ export class FreeRunReporter {
|
||||
}
|
||||
|
||||
private handleLine(rawLine: string, origin: StreamOrigin): void {
|
||||
const line = stripAnsiLine(rawLine);
|
||||
// GitHub Actions: bun wraps each file's section in ::group::<header>.
|
||||
// Without stripping, the real header fails FILE_HEADER_RE, failures get
|
||||
// attributed to the PREVIOUS file, and the terminal recap's re-printed
|
||||
// (fail) lines land under a second phantom file (observed on the first
|
||||
// Linux run: 5 real failures reported as 10 across 2 files).
|
||||
const line = stripAnsiLine(rawLine).replace(/^::group::/, '');
|
||||
let visible = false;
|
||||
|
||||
const header = FILE_HEADER_RE.exec(line);
|
||||
|
||||
Reference in New Issue
Block a user