Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wdio/spec-reporter

Package Overview
Dependencies
Maintainers
3
Versions
290
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/spec-reporter - npm Package Compare versions

Comparing version 9.2.8 to 9.2.14

3

build/index.d.ts

@@ -20,2 +20,4 @@ import type { Capabilities } from '@wdio/types';

private _suiteName;
private _isSuiteRetry;
private _passingTestsSinceLastRetry;
private _stateCounts;

@@ -36,2 +38,3 @@ private _symbols;

onSuiteEnd(): void;
onSuiteRetry(): void;
onHookEnd(hook: HookStats): void;

@@ -38,0 +41,0 @@ onTestStart(): void;

@@ -47,2 +47,4 @@ // src/index.ts

_suiteName = "";
_isSuiteRetry = false;
_passingTestsSinceLastRetry = 0;
// Keep track of the order that suites were called

@@ -52,3 +54,4 @@ _stateCounts = {

failed: 0,
skipped: 0
skipped: 0,
retried: 0
};

@@ -59,3 +62,4 @@ _symbols = {

pending: "?",
failed: "\u2716"
failed: "\u2716",
retried: "\u21BB"
};

@@ -107,3 +111,12 @@ _chalk;

this._indents--;
this._isSuiteRetry = false;
this._passingTestsSinceLastRetry = 0;
}
onSuiteRetry() {
this._stateCounts.failed--;
this._stateCounts.retried++;
this._stateCounts.passed -= this._passingTestsSinceLastRetry;
this._isSuiteRetry = true;
this._passingTestsSinceLastRetry = 0;
}
onHookEnd(hook) {

@@ -122,2 +135,5 @@ this.printCurrentStats(hook);

this._stateCounts.passed++;
if (!this._isSuiteRetry) {
this._passingTestsSinceLastRetry++;
}
}

@@ -280,3 +296,7 @@ onTestFail(testStat) {

}
output.push(`${suiteIndent}${suite.title}`);
let retryAnnotation = "";
if (suite.retries > 0) {
retryAnnotation = this._chalk.yellow(` (${suite.retries}x retries)`);
}
output.push(`${suiteIndent}${suite.title}${retryAnnotation}`);
if (suite.description) {

@@ -291,3 +311,4 @@ output.push(...suite.description.trim().split("\n").map((l) => `${suiteIndent}${this.setMessageColor(l.trim())}`));

for (const test of eventsToReport) {
const testTitle = `${test.title} ${test instanceof TestStats && test.retries && test.retries > 0 ? `(${test.retries} retries)` : ""}`;
const testRetryAnnotation = test instanceof TestStats && test.retries && test.retries > 0 ? this._chalk.yellow(`(${test.retries}x retries)`) : "";
const testTitle = `${test.title} ${testRetryAnnotation}`;
const state = test.state;

@@ -352,2 +373,6 @@ const testIndent = `${DEFAULT_INDENT}${suiteIndent}`;

}
if (this._stateCounts.retried > 0) {
const text = `${this._stateCounts.retried} retried ${duration}`.trim();
output.push(this.setMessageColor(text, "retried" /* RETRIED */));
}
return output;

@@ -460,2 +485,5 @@ }

break;
case "retried" /* RETRIED */:
color = "yellow" /* YELLOW */;
break;
}

@@ -462,0 +490,0 @@ return color;

5

build/types.d.ts

@@ -6,2 +6,3 @@ import type { Capabilities } from '@wdio/types';

skipped: number;
retried: number;
}

@@ -13,2 +14,3 @@ export interface Symbols {

failed: string;
retried: string;
}

@@ -79,3 +81,4 @@ export interface SpecReporterOptions {

PENDING = "pending",
SKIPPED = "skipped"
SKIPPED = "skipped",
RETRIED = "retried"
}

@@ -82,0 +85,0 @@ export interface TestLink {

{
"name": "@wdio/spec-reporter",
"version": "9.2.8",
"version": "9.2.14",
"description": "A WebdriverIO plugin to report in spec style",

@@ -34,3 +34,3 @@ "author": "Christian Bromann <mail@bromann.dev>",

"dependencies": {
"@wdio/reporter": "9.2.2",
"@wdio/reporter": "9.2.14",
"@wdio/types": "9.2.2",

@@ -44,3 +44,3 @@ "chalk": "^5.1.2",

},
"gitHead": "f02604aee33fb785a1737db3c9092bacfc99a1f3"
"gitHead": "6ba40850cc38dbb9a9622bee11939a19fb45bead"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc