@e2edev/e2e 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/act.js +2 -1
- package/dist/agent/act.js.map +1 -1
- package/dist/agent/invocation.d.ts.map +1 -1
- package/dist/agent/invocation.js +2 -1
- package/dist/agent/invocation.js.map +1 -1
- package/dist/agent/usage.d.ts +6 -1
- package/dist/agent/usage.d.ts.map +1 -1
- package/dist/agent/usage.js +12 -0
- package/dist/agent/usage.js.map +1 -1
- package/dist/cli/init/scaffold.d.ts.map +1 -1
- package/dist/cli/init/scaffold.js +1 -0
- package/dist/cli/init/scaffold.js.map +1 -1
- package/dist/config/agent.d.ts.map +1 -1
- package/dist/config/agent.js +17 -5
- package/dist/config/agent.js.map +1 -1
- package/dist/report/format.d.ts +9 -1
- package/dist/report/format.d.ts.map +1 -1
- package/dist/report/format.js +17 -4
- package/dist/report/format.js.map +1 -1
- package/dist/report/list-model.d.ts +79 -0
- package/dist/report/list-model.d.ts.map +1 -0
- package/dist/report/list-model.js +10 -0
- package/dist/report/list-model.js.map +1 -0
- package/dist/report/list-steps.d.ts +27 -0
- package/dist/report/list-steps.d.ts.map +1 -0
- package/dist/report/list-steps.js +65 -0
- package/dist/report/list-steps.js.map +1 -0
- package/dist/report/list.d.ts +26 -24
- package/dist/report/list.d.ts.map +1 -1
- package/dist/report/list.js +85 -157
- package/dist/report/list.js.map +1 -1
- package/dist/report/live-window.d.ts +11 -0
- package/dist/report/live-window.d.ts.map +1 -1
- package/dist/report/live-window.js +12 -5
- package/dist/report/live-window.js.map +1 -1
- package/dist/report/running-tree.d.ts +46 -0
- package/dist/report/running-tree.d.ts.map +1 -0
- package/dist/report/running-tree.js +182 -0
- package/dist/report/running-tree.js.map +1 -0
- package/dist/run/events.d.ts +2 -0
- package/dist/run/events.d.ts.map +1 -1
- package/dist/run/events.js.map +1 -1
- package/dist/run/runner.d.ts.map +1 -1
- package/dist/run/runner.js +3 -0
- package/dist/run/runner.js.map +1 -1
- package/dist/run/steps.d.ts +6 -0
- package/dist/run/steps.d.ts.map +1 -1
- package/dist/run/steps.js.map +1 -1
- package/package.json +4 -4
- package/skills/e2e/references/setup.md +1 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State the list reporter accumulates from the event stream, shared with the
|
|
3
|
+
* live tree that paints the running part of it. Records, not rendered text:
|
|
4
|
+
* each consumer renders at its own indent and width when it prints.
|
|
5
|
+
*/
|
|
6
|
+
import type { ResultStatus } from '../run/records.ts';
|
|
7
|
+
import type { StepEvent, StepKind, StepProgress } from '../run/steps.ts';
|
|
8
|
+
import type { AiUsage } from './format.ts';
|
|
9
|
+
/** Step events worth a glance in the live window; polls and policy decisions stay quiet. */
|
|
10
|
+
export type ShownEvent = StepEvent & {
|
|
11
|
+
readonly kind: 'model' | 'engine';
|
|
12
|
+
};
|
|
13
|
+
/** Whether an event is one the live window shows. */
|
|
14
|
+
export declare function isShownEvent(event: StepEvent): event is ShownEvent;
|
|
15
|
+
/** The step a running pair is executing right now. */
|
|
16
|
+
export interface CurrentStep {
|
|
17
|
+
readonly api: string;
|
|
18
|
+
readonly label: string;
|
|
19
|
+
/** Only an agent step has model turns to wait on. */
|
|
20
|
+
readonly kind: StepKind;
|
|
21
|
+
/**
|
|
22
|
+
* Model turns and tool calls in causal order: each turn before the tool
|
|
23
|
+
* calls it made. The executor reports a turn only after its tools ran, so
|
|
24
|
+
* the turn is inserted ahead of them.
|
|
25
|
+
*/
|
|
26
|
+
readonly events: ShownEvent[];
|
|
27
|
+
/** Index in `events` where the tool calls of the turn still in flight begin. */
|
|
28
|
+
turnStart: number;
|
|
29
|
+
}
|
|
30
|
+
/** One finished agent step of a pair, as the `end` progress reported it. */
|
|
31
|
+
export type FinishedStep = Pick<Extract<StepProgress, {
|
|
32
|
+
phase: 'end';
|
|
33
|
+
}>, 'api' | 'label' | 'status' | 'durationMs' | 'modelCalls'>;
|
|
34
|
+
/** A pair that has started and whose result is still to come. */
|
|
35
|
+
export interface RunningTest {
|
|
36
|
+
readonly group: FileGroup;
|
|
37
|
+
/** The pair's serial group, when it belongs to one. */
|
|
38
|
+
readonly serialId: string | undefined;
|
|
39
|
+
readonly title: string;
|
|
40
|
+
readonly startedMs: number;
|
|
41
|
+
/**
|
|
42
|
+
* False once a later serial member replaced this one: it has finished
|
|
43
|
+
* executing, but its result only arrives with the whole group.
|
|
44
|
+
*/
|
|
45
|
+
executing: boolean;
|
|
46
|
+
current: CurrentStep | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Finished agent steps across every attempt, oldest first. Shown under the
|
|
49
|
+
* test in the live window while it runs, nested under its line in the file
|
|
50
|
+
* block once it is done.
|
|
51
|
+
*/
|
|
52
|
+
readonly steps: FinishedStep[];
|
|
53
|
+
}
|
|
54
|
+
/** One finished pair, held until its file's block prints. */
|
|
55
|
+
export interface TestLine {
|
|
56
|
+
readonly title: string;
|
|
57
|
+
/** Source order within the file; blocks list tests as declared, not as finished. */
|
|
58
|
+
readonly declarationIndex: number;
|
|
59
|
+
readonly status: ResultStatus;
|
|
60
|
+
readonly durationMs: number;
|
|
61
|
+
readonly usage: AiUsage;
|
|
62
|
+
readonly firstErrorLine: string | undefined;
|
|
63
|
+
readonly skipReason: string | undefined;
|
|
64
|
+
readonly steps: readonly FinishedStep[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Every pair of one test file on one target: vitest's "test module". Its
|
|
68
|
+
* block prints once all planned results are in, so files never interleave.
|
|
69
|
+
* Counts, durations, and usage derive from `lines`, so there is one source.
|
|
70
|
+
*/
|
|
71
|
+
export interface FileGroup {
|
|
72
|
+
readonly file: string;
|
|
73
|
+
readonly target: string;
|
|
74
|
+
/** Reportable pairs the plan announced; undefined until the plan arrives. */
|
|
75
|
+
planned: number | undefined;
|
|
76
|
+
readonly lines: TestLine[];
|
|
77
|
+
printed: boolean;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMapp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MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC;CAChC;AAED,6DAA6D;AAC7D,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State the list reporter accumulates from the event stream, shared with the
|
|
3
|
+
* live tree that paints the running part of it. Records, not rendered text:
|
|
4
|
+
* each consumer renders at its own indent and width when it prints.
|
|
5
|
+
*/
|
|
6
|
+
/** Whether an event is one the live window shows. */
|
|
7
|
+
export function isShownEvent(event) {
|
|
8
|
+
return event.kind === 'model' || event.kind === 'engine';
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=list-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-model.js","sourceRoot":"","sources":["../../src/report/list-model.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,qDAAqD;AACrD,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders one agent step and its calls for the list reporter: the same
|
|
3
|
+
* finished step prints in a CI log, in a file block, and in the live window,
|
|
4
|
+
* each at its own indent, so nothing here knows where the line lands.
|
|
5
|
+
*/
|
|
6
|
+
import { type Colors } from './format.ts';
|
|
7
|
+
import type { FinishedStep, ShownEvent } from './list-model.ts';
|
|
8
|
+
/** One-line, quoted step label; `maxChars` clips it further to fit a row. */
|
|
9
|
+
export declare function stepLabel(label: string, maxChars?: number): string;
|
|
10
|
+
export interface StepLineOptions {
|
|
11
|
+
/** Text before the api, naming the test when the line prints away from it. */
|
|
12
|
+
readonly context?: string;
|
|
13
|
+
/** Printed width the line may take; the label is clipped so the tail stays on the row. */
|
|
14
|
+
readonly maxWidth?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* One finished agent step: outcome glyph, api, quoted label, then duration,
|
|
18
|
+
* model calls, and a non-passed status.
|
|
19
|
+
*/
|
|
20
|
+
export declare function stepLine(pc: Colors, step: FinishedStep, options?: StepLineOptions): string;
|
|
21
|
+
/**
|
|
22
|
+
* One model turn or tool call under the current step. A tool call reads as
|
|
23
|
+
* the act it performed when the engine described it, else as the tool name
|
|
24
|
+
* (`tool:` prefixes come from executor tool accounting).
|
|
25
|
+
*/
|
|
26
|
+
export declare function eventLine(pc: Colors, event: ShownEvent): string;
|
|
27
|
+
//# sourceMappingURL=list-steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-steps.d.ts","sourceRoot":"","sources":["../../src/report/list-steps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAOL,KAAK,MAAM,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAehE,6EAA6E;AAC7E,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAuB,GAAG,MAAM,CAGhF;AAED,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,GAAE,eAAoB,GAAG,MAAM,CAY9F;AAaD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAQ/D"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders one agent step and its calls for the list reporter: the same
|
|
3
|
+
* finished step prints in a CI log, in a file block, and in the live window,
|
|
4
|
+
* each at its own indent, so nothing here knows where the line lands.
|
|
5
|
+
*/
|
|
6
|
+
import { sanitizeText, truncateUtf8 } from '../internal/errors.js';
|
|
7
|
+
import { collapseText } from '../internal/text.js';
|
|
8
|
+
import { ellipsize, F_CHECK, F_CROSS, formatTime, formatTokens, visibleWidth, } from './format.js';
|
|
9
|
+
/** Step labels stay one glanceable line; the report holds the full text. */
|
|
10
|
+
const MAX_STEP_LABEL_CHARS = 72;
|
|
11
|
+
/** A clipped step line keeps at least this much of its label, however narrow the terminal. */
|
|
12
|
+
const MIN_STEP_LABEL_CHARS = 24;
|
|
13
|
+
/** Columns a step line spends around its label: the quotes and the space before the tail. */
|
|
14
|
+
const LABEL_CHROME = 3;
|
|
15
|
+
/** A finished model turn. */
|
|
16
|
+
const F_MODEL = '•';
|
|
17
|
+
/** A tool call the model made. */
|
|
18
|
+
const F_TOOL = '›';
|
|
19
|
+
const F_INPUT = '↑';
|
|
20
|
+
const F_OUTPUT = '↓';
|
|
21
|
+
/** One-line, quoted step label; `maxChars` clips it further to fit a row. */
|
|
22
|
+
export function stepLabel(label, maxChars = MAX_STEP_LABEL_CHARS) {
|
|
23
|
+
const max = Math.min(MAX_STEP_LABEL_CHARS, Math.max(MIN_STEP_LABEL_CHARS, maxChars));
|
|
24
|
+
return `"${ellipsize(collapseText(label), max)}"`;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* One finished agent step: outcome glyph, api, quoted label, then duration,
|
|
28
|
+
* model calls, and a non-passed status.
|
|
29
|
+
*/
|
|
30
|
+
export function stepLine(pc, step, options = {}) {
|
|
31
|
+
const glyph = step.status === 'passed' ? pc.green(F_CHECK) : pc.red(F_CROSS);
|
|
32
|
+
const calls = step.modelCalls > 0 ? ` · ${step.modelCalls} model call${step.modelCalls === 1 ? '' : 's'}` : '';
|
|
33
|
+
const outcome = step.status === 'passed' ? '' : ` ${step.status}`;
|
|
34
|
+
const head = `${glyph} ${options.context ?? ''}${pc.dim(step.api)} `;
|
|
35
|
+
const tail = pc.dim(`${formatTime(step.durationMs)}${calls}${outcome}`);
|
|
36
|
+
const room = options.maxWidth === undefined
|
|
37
|
+
? undefined
|
|
38
|
+
: options.maxWidth - visibleWidth(head) - visibleWidth(tail) - LABEL_CHROME;
|
|
39
|
+
return `${head}${stepLabel(step.label, room)} ${tail}`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* `(↑in ↓out)` for one model call, the total when only that is known, or
|
|
43
|
+
* nothing when the provider reported no usage.
|
|
44
|
+
*/
|
|
45
|
+
function tokenSplit(event) {
|
|
46
|
+
if (event.inputTokens !== undefined && event.outputTokens !== undefined) {
|
|
47
|
+
return ` (${F_INPUT}${formatTokens(event.inputTokens)} ${F_OUTPUT}${formatTokens(event.outputTokens)})`;
|
|
48
|
+
}
|
|
49
|
+
return event.count !== undefined && event.count > 0 ? ` (${formatTokens(event.count)} tokens)` : '';
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* One model turn or tool call under the current step. A tool call reads as
|
|
53
|
+
* the act it performed when the engine described it, else as the tool name
|
|
54
|
+
* (`tool:` prefixes come from executor tool accounting).
|
|
55
|
+
*/
|
|
56
|
+
export function eventLine(pc, event) {
|
|
57
|
+
if (event.kind === 'model') {
|
|
58
|
+
return pc.dim(`${F_MODEL} Thinking (${formatTime(event.durationMs)})${tokenSplit(event)}`);
|
|
59
|
+
}
|
|
60
|
+
const name = sanitizeText(event.name ?? 'engine').replace(/^tool:/, '');
|
|
61
|
+
const act = event.detail === undefined ? name : sanitizeText(collapseText(event.detail));
|
|
62
|
+
const failed = event.status === 'passed' ? '' : ` ${pc.red(F_CROSS)}`;
|
|
63
|
+
return `${pc.dim(`${F_TOOL} ${truncateUtf8(act, 60)} (${formatTime(event.durationMs)})`)}${failed}`;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=list-steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-steps.js","sourceRoot":"","sources":["../../src/report/list-steps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACL,SAAS,EACT,OAAO,EACP,OAAO,EACP,UAAU,EACV,YAAY,EACZ,YAAY,GAEb,MAAM,aAAa,CAAC;AAGrB,4EAA4E;AAC5E,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,8FAA8F;AAC9F,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,6FAA6F;AAC7F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,KAAK,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACxE,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;IACtE,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC;AACtG,CAAC"}
|
package/dist/report/list.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Human-readable list reporter, styled after vitest's
|
|
3
|
-
*
|
|
4
|
-
* section with code frames, and a padded summary. On a TTY a
|
|
5
|
-
* below the log shows the running
|
|
2
|
+
* Human-readable list reporter, styled after vitest's default reporter: one
|
|
3
|
+
* block per test file and target with each test's agent steps nested, a
|
|
4
|
+
* `Failed Tests` section with code frames, and a padded summary. On a TTY a
|
|
5
|
+
* live window below the log shows the running tree (`RunningTree`) and the
|
|
6
|
+
* counters.
|
|
6
7
|
*/
|
|
7
8
|
import type { RunEventFact } from '../run/events.ts';
|
|
8
9
|
export interface ListReporterOutput {
|
|
@@ -25,6 +26,7 @@ export declare class ListReporter {
|
|
|
25
26
|
private readonly output;
|
|
26
27
|
private readonly pc;
|
|
27
28
|
private readonly window;
|
|
29
|
+
private readonly tree;
|
|
28
30
|
private readonly separator;
|
|
29
31
|
private projectRoot;
|
|
30
32
|
/** Selected targets in declaration order; decides each badge's color. */
|
|
@@ -33,8 +35,10 @@ export declare class ListReporter {
|
|
|
33
35
|
private startedAt;
|
|
34
36
|
/** File groups keyed `${target}\u0000${file}`, in first-seen order. */
|
|
35
37
|
private readonly groups;
|
|
36
|
-
/** Pairs
|
|
37
|
-
private readonly
|
|
38
|
+
/** Pairs that started and whose result is still to come, keyed by `pairKey`, in start order. */
|
|
39
|
+
private readonly pairs;
|
|
40
|
+
/** Whether a live window paints; without one, finished steps stream permanently. */
|
|
41
|
+
private readonly live;
|
|
38
42
|
private readonly failures;
|
|
39
43
|
/**
|
|
40
44
|
* Serial groups whose members' results are still to come, by group id. The
|
|
@@ -66,18 +70,19 @@ export declare class ListReporter {
|
|
|
66
70
|
/**
|
|
67
71
|
* A worker began one test-target pair: show it in the live window. A serial
|
|
68
72
|
* member replaces the previous member of its group, which has finished
|
|
69
|
-
* executing even though its result only arrives with the whole group.
|
|
73
|
+
* executing even though its result only arrives with the whole group. A
|
|
74
|
+
* serial group retries as a whole, so a member starts once per group
|
|
75
|
+
* attempt; its steps from earlier attempts stay with it, as an ordinary
|
|
76
|
+
* test's do.
|
|
70
77
|
*/
|
|
71
78
|
private testStarted;
|
|
72
79
|
/**
|
|
73
|
-
*
|
|
74
|
-
* agent steps
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* the live window, and finished agent steps print with the test they
|
|
80
|
-
* belong to.
|
|
80
|
+
* Tracks step progress of a running pair. With a live window the pair's
|
|
81
|
+
* finished agent steps accumulate under its row there and print once, nested
|
|
82
|
+
* under its line, when the file block prints - so every name appears exactly
|
|
83
|
+
* once in the scrollback. Without a window (CI logs) nothing is transient, so
|
|
84
|
+
* each finished agent step prints at once, prefixed with its test. Deterministic
|
|
85
|
+
* steps are fast and many, so they only ever show in the live window.
|
|
81
86
|
*/
|
|
82
87
|
private step;
|
|
83
88
|
/** Holds a serial group until each of its members' results has read its details. */
|
|
@@ -95,8 +100,11 @@ export declare class ListReporter {
|
|
|
95
100
|
private fileCounters;
|
|
96
101
|
/**
|
|
97
102
|
* Prints one file's block: the file line with its counts, then - when the
|
|
98
|
-
* file failed, had a flaky pass,
|
|
99
|
-
*
|
|
103
|
+
* file failed, had a flaky pass, or is the run's only file - one line per
|
|
104
|
+
* test with its finished agent steps nested, as vitest lists tests for a
|
|
105
|
+
* failed module. With a live window the block is also the only permanent
|
|
106
|
+
* record of a file's agent steps, so a file that has any lists its tests
|
|
107
|
+
* too; without one the steps already printed as they finished.
|
|
100
108
|
*/
|
|
101
109
|
private printGroup;
|
|
102
110
|
/** One test row under its file line, plus the first error line for a failure. */
|
|
@@ -106,13 +114,7 @@ export declare class ListReporter {
|
|
|
106
114
|
* files, tests, model usage, run errors, start time, and elapsed time.
|
|
107
115
|
*/
|
|
108
116
|
private summaryRows;
|
|
109
|
-
/**
|
|
110
|
-
* The live window: running files and tests, then the summary. The block
|
|
111
|
-
* must fit the screen, because repainting more rows than the terminal has
|
|
112
|
-
* breaks the cursor-up erase: rows left after the summary go to the running
|
|
113
|
-
* tests, each test's calls share what remains once every test has its own
|
|
114
|
-
* line, and tests that still do not fit fold into one `more running` marker.
|
|
115
|
-
*/
|
|
117
|
+
/** The live window: the running tree, then the summary. */
|
|
116
118
|
private renderWindow;
|
|
117
119
|
/** vitest's `Failed Tests` section: a banner, then each failure with its code frame. */
|
|
118
120
|
private printFailures;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/report/list.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/report/list.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,YAAY,EAA8B,MAAM,kBAAkB,CAAC;AAoDjF,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,uEAAuE;IACvE,GAAG,CAAC,CAAC,I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