@e2edev/e2e 0.6.0 → 0.7.0
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/README.md +7 -8
- package/dist/agent/act-validation.d.ts +4 -1
- package/dist/agent/act-validation.d.ts.map +1 -1
- package/dist/agent/act-validation.js +7 -3
- package/dist/agent/act-validation.js.map +1 -1
- package/dist/agent/act.d.ts.map +1 -1
- package/dist/agent/act.js +16 -2
- package/dist/agent/act.js.map +1 -1
- package/dist/agent/actions.d.ts +14 -14
- package/dist/agent/actions.d.ts.map +1 -1
- package/dist/agent/actions.js +12 -2
- package/dist/agent/actions.js.map +1 -1
- package/dist/agent/executor.d.ts +7 -0
- package/dist/agent/executor.d.ts.map +1 -1
- package/dist/agent/executor.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/model/sdk.js +1 -1
- package/dist/agent/model/sdk.js.map +1 -1
- package/dist/agent/step-cache.d.ts +8 -8
- package/dist/agent/step-cache.d.ts.map +1 -1
- package/dist/agent/step-cache.js +14 -15
- package/dist/agent/step-cache.js.map +1 -1
- package/dist/agent/tool-loop.d.ts.map +1 -1
- package/dist/agent/tool-loop.js +1 -0
- package/dist/agent/tool-loop.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/cache/anchors.d.ts.map +1 -1
- package/dist/cache/anchors.js +21 -1
- package/dist/cache/anchors.js.map +1 -1
- package/dist/cache/decide.d.ts +9 -0
- package/dist/cache/decide.d.ts.map +1 -1
- package/dist/cache/decide.js +35 -0
- package/dist/cache/decide.js.map +1 -1
- package/dist/cache/relocate.d.ts +11 -1
- package/dist/cache/relocate.d.ts.map +1 -1
- package/dist/cache/relocate.js +48 -17
- package/dist/cache/relocate.js.map +1 -1
- package/dist/cache/store.d.ts.map +1 -1
- package/dist/cache/store.js +3 -14
- package/dist/cache/store.js.map +1 -1
- package/dist/cache/trace.d.ts +12 -0
- package/dist/cache/trace.d.ts.map +1 -1
- package/dist/cache/trace.js +21 -0
- package/dist/cache/trace.js.map +1 -1
- package/dist/cli/docs-url.d.ts +1 -1
- package/dist/cli/docs-url.d.ts.map +1 -1
- package/dist/cli/docs-url.js +1 -1
- package/dist/cli/docs-url.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +58 -9
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/scaffold.d.ts.map +1 -1
- package/dist/cli/init/scaffold.js +3 -0
- package/dist/cli/init/scaffold.js.map +1 -1
- package/dist/cli/telemetry.d.ts +12 -0
- package/dist/cli/telemetry.d.ts.map +1 -0
- package/dist/cli/telemetry.js +40 -0
- package/dist/cli/telemetry.js.map +1 -0
- package/dist/collect/select.d.ts +2 -0
- package/dist/collect/select.d.ts.map +1 -1
- package/dist/collect/select.js +15 -11
- package/dist/collect/select.js.map +1 -1
- package/dist/config/agent.d.ts.map +1 -1
- package/dist/config/agent.js +41 -6
- package/dist/config/agent.js.map +1 -1
- package/dist/config/diagnose.d.ts.map +1 -1
- package/dist/config/diagnose.js +1 -0
- package/dist/config/diagnose.js.map +1 -1
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +2 -5
- package/dist/config/resolve.js.map +1 -1
- package/dist/engine/index.d.ts +5 -2
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/ai-trace.d.ts +1 -5
- package/dist/internal/ai-trace.d.ts.map +1 -1
- package/dist/internal/ai-trace.js +82 -11
- package/dist/internal/ai-trace.js.map +1 -1
- package/dist/internal/atomic-write.d.ts +17 -0
- package/dist/internal/atomic-write.d.ts.map +1 -0
- package/dist/internal/atomic-write.js +44 -0
- package/dist/internal/atomic-write.js.map +1 -0
- package/dist/internal/env.d.ts +6 -0
- package/dist/internal/env.d.ts.map +1 -0
- package/dist/internal/env.js +12 -0
- package/dist/internal/env.js.map +1 -0
- package/dist/report/build.d.ts.map +1 -1
- package/dist/report/build.js +9 -4
- package/dist/report/build.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 +85 -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 +73 -27
- package/dist/report/list.d.ts.map +1 -1
- package/dist/report/list.js +201 -171
- 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 +186 -0
- package/dist/report/running-tree.js.map +1 -0
- package/dist/report/write.d.ts +1 -1
- package/dist/report/write.d.ts.map +1 -1
- package/dist/report/write.js +3 -6
- package/dist/report/write.js.map +1 -1
- package/dist/run/events.d.ts +61 -8
- package/dist/run/events.d.ts.map +1 -1
- package/dist/run/events.js.map +1 -1
- package/dist/run/execute.d.ts +7 -0
- package/dist/run/execute.d.ts.map +1 -1
- package/dist/run/execute.js +6 -0
- package/dist/run/execute.js.map +1 -1
- package/dist/run/fixtures.d.ts +3 -0
- package/dist/run/fixtures.d.ts.map +1 -1
- package/dist/run/fixtures.js +5 -3
- package/dist/run/fixtures.js.map +1 -1
- package/dist/run/managed-process.d.ts +8 -2
- package/dist/run/managed-process.d.ts.map +1 -1
- package/dist/run/managed-process.js +12 -0
- package/dist/run/managed-process.js.map +1 -1
- package/dist/run/public.d.ts +1 -1
- package/dist/run/public.d.ts.map +1 -1
- package/dist/run/records.d.ts +2 -1
- package/dist/run/records.d.ts.map +1 -1
- package/dist/run/runner.d.ts +3 -2
- package/dist/run/runner.d.ts.map +1 -1
- package/dist/run/runner.js +129 -48
- package/dist/run/runner.js.map +1 -1
- package/dist/run/scheduler.d.ts +2 -0
- package/dist/run/scheduler.d.ts.map +1 -1
- package/dist/run/scheduler.js +4 -0
- package/dist/run/scheduler.js.map +1 -1
- package/dist/run/sessions.d.ts.map +1 -1
- package/dist/run/sessions.js +3 -4
- package/dist/run/sessions.js.map +1 -1
- package/dist/run/steps.d.ts +9 -1
- package/dist/run/steps.d.ts.map +1 -1
- package/dist/run/steps.js +2 -0
- package/dist/run/steps.js.map +1 -1
- package/dist/run/worker/protocol.d.ts +10 -1
- package/dist/run/worker/protocol.d.ts.map +1 -1
- package/dist/run/worker/protocol.js.map +1 -1
- package/dist/run/worker/session.d.ts.map +1 -1
- package/dist/run/worker/session.js +4 -0
- package/dist/run/worker/session.js.map +1 -1
- package/dist/run/worker-models.d.ts +27 -0
- package/dist/run/worker-models.d.ts.map +1 -0
- package/dist/run/worker-models.js +49 -0
- package/dist/run/worker-models.js.map +1 -0
- package/dist/telemetry/environment.d.ts +33 -0
- package/dist/telemetry/environment.d.ts.map +1 -0
- package/dist/telemetry/environment.js +96 -0
- package/dist/telemetry/environment.js.map +1 -0
- package/dist/telemetry/events.d.ts +25 -0
- package/dist/telemetry/events.d.ts.map +1 -0
- package/dist/telemetry/events.js +107 -0
- package/dist/telemetry/events.js.map +1 -0
- package/dist/telemetry/posthog.d.ts +31 -0
- package/dist/telemetry/posthog.d.ts.map +1 -0
- package/dist/telemetry/posthog.js +29 -0
- package/dist/telemetry/posthog.js.map +1 -0
- package/dist/telemetry/project.d.ts +18 -0
- package/dist/telemetry/project.d.ts.map +1 -0
- package/dist/telemetry/project.js +55 -0
- package/dist/telemetry/project.js.map +1 -0
- package/dist/telemetry/store.d.ts +53 -0
- package/dist/telemetry/store.d.ts.map +1 -0
- package/dist/telemetry/store.js +153 -0
- package/dist/telemetry/store.js.map +1 -0
- package/dist/telemetry/telemetry.d.ts +90 -0
- package/dist/telemetry/telemetry.d.ts.map +1 -0
- package/dist/telemetry/telemetry.js +188 -0
- package/dist/telemetry/telemetry.js.map +1 -0
- package/dist/types.d.ts +6 -9
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/skills/e2e/references/agent.md +13 -3
- package/skills/e2e/references/debugging.md +1 -1
- package/skills/e2e/references/running.md +3 -2
- package/skills/e2e/references/setup.md +6 -1
|
@@ -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 @@
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,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;AACtG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,EAAU,EAAE,KAAiB;IACrD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC3B,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,OAAO,cAAc,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC7F,CAAC;IACD,MAAM,IAAI,GAAG,YAAY,CAAC,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,16 +26,25 @@ 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. */
|
|
31
33
|
private targets;
|
|
32
|
-
/** When the run
|
|
34
|
+
/** When the run was launched (`run-started`): what a run that never reached `plan` reports. */
|
|
35
|
+
private launchedAt;
|
|
36
|
+
/**
|
|
37
|
+
* When the run began executing (`plan`): the summary's `Start at` and the
|
|
38
|
+
* origin of `Duration`. Undefined until then, so the clock never ticks
|
|
39
|
+
* while a first-run download narrates above the live window.
|
|
40
|
+
*/
|
|
33
41
|
private startedAt;
|
|
34
42
|
/** File groups keyed `${target}\u0000${file}`, in first-seen order. */
|
|
35
43
|
private readonly groups;
|
|
36
|
-
/** Pairs
|
|
37
|
-
private readonly
|
|
44
|
+
/** Pairs that started and whose result is still to come, keyed by `pairKey`, in start order. */
|
|
45
|
+
private readonly pairs;
|
|
46
|
+
/** Whether a live window paints; without one, finished steps stream permanently. */
|
|
47
|
+
private readonly live;
|
|
38
48
|
private readonly failures;
|
|
39
49
|
/**
|
|
40
50
|
* Serial groups whose members' results are still to come, by group id. The
|
|
@@ -44,6 +54,20 @@ export declare class ListReporter {
|
|
|
44
54
|
private readonly pendingSerial;
|
|
45
55
|
/** Run-level errors, printed once at the end; the stream carries them as they happen. */
|
|
46
56
|
private readonly errors;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the run was cut short. An interrupt during service or app startup
|
|
59
|
+
* lands before discovery, so the counters stay at zero; the summary must not
|
|
60
|
+
* read that as "no test files".
|
|
61
|
+
*/
|
|
62
|
+
private interrupted;
|
|
63
|
+
/**
|
|
64
|
+
* The setup step in flight, ticking in the live window. `narrated` once a
|
|
65
|
+
* notice printed under it: a step that said something (a browser download)
|
|
66
|
+
* prints its total when done, a silent one (an instant `prepare`) does not.
|
|
67
|
+
*/
|
|
68
|
+
private inFlight;
|
|
69
|
+
/** Time spent starting services and app commands, split out of the summary's `Duration`. */
|
|
70
|
+
private startupMs;
|
|
47
71
|
/** Run-wide model usage, summed from every reported result and serial group. */
|
|
48
72
|
private readonly runUsage;
|
|
49
73
|
constructor(output?: ListReporterOutput, options?: ListReporterOptions);
|
|
@@ -60,24 +84,44 @@ export declare class ListReporter {
|
|
|
60
84
|
private displayPath;
|
|
61
85
|
private group;
|
|
62
86
|
private runStarted;
|
|
87
|
+
/**
|
|
88
|
+
* The plan is settled once collection and every target's `prepare` are
|
|
89
|
+
* done, so its arrival is when the run starts executing and the clock
|
|
90
|
+
* starts: a browser downloaded moments earlier is not on it.
|
|
91
|
+
*/
|
|
63
92
|
private plan;
|
|
64
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* The setup stretch before any test: collection, each target's `prepare`,
|
|
95
|
+
* then the services and app commands. Without this the window showed only
|
|
96
|
+
* zero counters while a database booted or a browser downloaded. The step
|
|
97
|
+
* in flight ticks in the live window; a finished process prints once with
|
|
98
|
+
* its wait, a finished collection or provisioning only when it narrated;
|
|
99
|
+
* the process waits sum into the summary's startup split.
|
|
100
|
+
*/
|
|
101
|
+
private setupStep;
|
|
102
|
+
/**
|
|
103
|
+
* Acknowledged immediately, so a bounded teardown is not mistaken for a
|
|
104
|
+
* hang. An interrupt that lands during setup names the step it cut short
|
|
105
|
+
* (`interrupted while starting service "postgres"`), since no test was
|
|
106
|
+
* running to stop.
|
|
107
|
+
*/
|
|
65
108
|
private runInterrupted;
|
|
66
109
|
/**
|
|
67
110
|
* A worker began one test-target pair: show it in the live window. A serial
|
|
68
111
|
* member replaces the previous member of its group, which has finished
|
|
69
|
-
* executing even though its result only arrives with the whole group.
|
|
112
|
+
* executing even though its result only arrives with the whole group. A
|
|
113
|
+
* serial group retries as a whole, so a member starts once per group
|
|
114
|
+
* attempt; its steps from earlier attempts stay with it, as an ordinary
|
|
115
|
+
* test's do.
|
|
70
116
|
*/
|
|
71
117
|
private testStarted;
|
|
72
118
|
/**
|
|
73
|
-
*
|
|
74
|
-
* agent steps
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* the live window, and finished agent steps print with the test they
|
|
80
|
-
* belong to.
|
|
119
|
+
* Tracks step progress of a running pair. With a live window the pair's
|
|
120
|
+
* finished agent steps accumulate under its row there and print once, nested
|
|
121
|
+
* under its line, when the file block prints - so every name appears exactly
|
|
122
|
+
* once in the scrollback. Without a window (CI logs) nothing is transient, so
|
|
123
|
+
* each finished agent step prints at once, prefixed with its test. Deterministic
|
|
124
|
+
* steps are fast and many, so they only ever show in the live window.
|
|
81
125
|
*/
|
|
82
126
|
private step;
|
|
83
127
|
/** Holds a serial group until each of its members' results has read its details. */
|
|
@@ -95,24 +139,26 @@ export declare class ListReporter {
|
|
|
95
139
|
private fileCounters;
|
|
96
140
|
/**
|
|
97
141
|
* Prints one file's block: the file line with its counts, then - when the
|
|
98
|
-
* file failed, had a flaky pass,
|
|
99
|
-
*
|
|
142
|
+
* file failed, had a flaky pass, or is the run's only file - one line per
|
|
143
|
+
* test with its finished agent steps nested, as vitest lists tests for a
|
|
144
|
+
* failed module. With a live window the block is also the only permanent
|
|
145
|
+
* record of a file's agent steps, so a file that has any lists its tests
|
|
146
|
+
* too; without one the steps already printed as they finished.
|
|
100
147
|
*/
|
|
101
148
|
private printGroup;
|
|
102
149
|
/** One test row under its file line, plus the first error line for a failure. */
|
|
103
150
|
private testLine;
|
|
104
151
|
/**
|
|
105
152
|
* vitest's padded summary, shared by the live window and the final report:
|
|
106
|
-
* files, tests, model usage, run errors, start time, and elapsed time.
|
|
153
|
+
* files, tests, model usage, run errors, start time, and elapsed time. The
|
|
154
|
+
* clock rows wait for `plan`; the final summary of a run that never got
|
|
155
|
+
* there (a config or collection failure, a failed download) counts from
|
|
156
|
+
* the launch instead, so the time it took to fail is still on record.
|
|
107
157
|
*/
|
|
108
158
|
private summaryRows;
|
|
109
|
-
/**
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
*/
|
|
159
|
+
/** A zero counter's label: the plain text, or the interrupt when that is why nothing is counted. */
|
|
160
|
+
private emptyState;
|
|
161
|
+
/** The live window: the running tree, then the summary. */
|
|
116
162
|
private renderWindow;
|
|
117
163
|
/** vitest's `Failed Tests` section: a banner, then each failure with its code frame. */
|
|
118
164
|
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,EAAyC,MAAM,kBAAkB,CAAC;AAoD5F,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,uEAAuE;IACvE,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA0DD;;;;GAIG;AACH,qBAAa,YAAY;IAiDrB,OAAO,CAAC,QAAQ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