@arpanp/zen-reporter 0.10.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/LICENSE +21 -0
- package/README.md +146 -0
- package/bin/zen-reporter.js +673 -0
- package/dist/dataProcessor.d.ts +47 -0
- package/dist/exportToCsv.d.ts +15 -0
- package/dist/index.html +105 -0
- package/dist/reporter.cjs +871 -0
- package/dist/reporter.d.ts +61 -0
- package/dist/reporter.js +846 -0
- package/dist/runHistory.d.ts +21 -0
- package/dist/tagColors.d.ts +19 -0
- package/dist/types.d.ts +192 -0
- package/dist/utils.d.ts +126 -0
- package/package.json +102 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { FullConfig, FullResult, Reporter, Suite, TestCase, TestResult } from '@playwright/test/reporter';
|
|
2
|
+
export interface ReporterConfig {
|
|
3
|
+
outputDir: string;
|
|
4
|
+
packageManager: string;
|
|
5
|
+
projectName: string;
|
|
6
|
+
testRunName: string;
|
|
7
|
+
singleSummaryFile?: boolean;
|
|
8
|
+
theme?: string;
|
|
9
|
+
darkMode?: boolean;
|
|
10
|
+
enableHistory: 'auto' | boolean;
|
|
11
|
+
minimalReport?: boolean;
|
|
12
|
+
consoleProgress: 'auto' | 'line' | 'dot' | boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function resolveConfig(rawConfig?: Record<string, unknown>, cwd?: string): ReporterConfig;
|
|
15
|
+
declare class ZenReporter implements Reporter {
|
|
16
|
+
private config;
|
|
17
|
+
private reportConfig;
|
|
18
|
+
private testCaseMap;
|
|
19
|
+
private startTime;
|
|
20
|
+
private testCases;
|
|
21
|
+
private options?;
|
|
22
|
+
private totalTests;
|
|
23
|
+
private completedTests;
|
|
24
|
+
private completedTestIds;
|
|
25
|
+
private passedCount;
|
|
26
|
+
private failedCount;
|
|
27
|
+
private timedOutCount;
|
|
28
|
+
private skippedCount;
|
|
29
|
+
private activeWorkers;
|
|
30
|
+
private lastCompletedTest;
|
|
31
|
+
private dotLineLength;
|
|
32
|
+
private progressMode;
|
|
33
|
+
constructor(options?: Record<string, unknown>);
|
|
34
|
+
private printLineProgress;
|
|
35
|
+
private clearLineProgress;
|
|
36
|
+
private handleDotProgress;
|
|
37
|
+
private buildSuites;
|
|
38
|
+
/**
|
|
39
|
+
* Persist every run as a self-contained per-run JSONL file under
|
|
40
|
+
* <outputDir>/runs/ so historic runs survive report rebuilds.
|
|
41
|
+
* Failure policy: catch-and-log only — history writing must never break
|
|
42
|
+
* report/HTML generation.
|
|
43
|
+
*/
|
|
44
|
+
private writeRunHistory;
|
|
45
|
+
/**
|
|
46
|
+
* Regenerate `history.json` by running the CLI's `history report`
|
|
47
|
+
* subcommand (the CLI owns the DuckDB aggregate queries — single source
|
|
48
|
+
* of truth) and inject the fresh snapshot into `<outputDir>/index.html`.
|
|
49
|
+
* Runs after the new run's JSONL has been written, so it includes the
|
|
50
|
+
* just-finished run. Best-effort: any failure (missing @duckdb/node-api,
|
|
51
|
+
* missing bin, spawn error) is caught and logged; the snapshot that was
|
|
52
|
+
* re-injected above remains in the report.
|
|
53
|
+
*/
|
|
54
|
+
private refreshHistory;
|
|
55
|
+
onBegin(config: FullConfig, suite: Suite): void;
|
|
56
|
+
onTestBegin(test: TestCase, _result: TestResult): void;
|
|
57
|
+
onTestEnd(test: TestCase, result: TestResult): void;
|
|
58
|
+
onEnd(result: FullResult): void;
|
|
59
|
+
}
|
|
60
|
+
export declare function getShowReportCommand(pm?: string, cwd?: string): string;
|
|
61
|
+
export default ZenReporter;
|