@epicat/toon-reporter 0.0.10 → 0.0.11

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.
@@ -12,6 +12,7 @@ declare class ToonPlaywrightReporter implements Reporter {
12
12
  private config;
13
13
  private suite;
14
14
  private options;
15
+ private testsDiscovered;
15
16
  constructor(options?: ToonPlaywrightReporterOptions);
16
17
  onBegin(config: FullConfig, suite: Suite): void;
17
18
  private formatLocation;
@@ -17,11 +17,13 @@ function formatDuration(ms) {
17
17
  }
18
18
  var ToonPlaywrightReporter = class {
19
19
  constructor(options = {}) {
20
+ this.testsDiscovered = 0;
20
21
  this.options = options;
21
22
  }
22
23
  onBegin(config, suite) {
23
24
  this.config = config;
24
25
  this.suite = suite;
26
+ this.testsDiscovered = suite.allTests().length;
25
27
  }
26
28
  formatLocation(filePath, line, column) {
27
29
  const relPath = relative(process.cwd(), filePath);
@@ -52,7 +54,13 @@ var ToonPlaywrightReporter = class {
52
54
  async onEnd(result) {
53
55
  const allTests = this.suite.allTests();
54
56
  if (allTests.length === 0) {
55
- await this.writeReport(encode({ error: "No test files found" }));
57
+ let errorMessage;
58
+ if (this.testsDiscovered > 0) errorMessage = `${this.testsDiscovered} test(s) discovered but not executed`;
59
+ else if (result.status === "interrupted") errorMessage = "Test run was interrupted";
60
+ else if (result.status === "timedout") errorMessage = "Test run timed out";
61
+ else errorMessage = "No test files found";
62
+ const report$1 = { error: errorMessage };
63
+ await this.writeReport(encode(report$1));
56
64
  return;
57
65
  }
58
66
  const passedTests = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epicat/toon-reporter",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "A minimal Vitest reporter optimized for LLM consumption",
5
5
  "repository": {
6
6
  "type": "git",