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

wdio-ctrf-json-reporter

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wdio-ctrf-json-reporter - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

dist/generate-report.d.ts

@@ -24,8 +24,6 @@ import WDIOReporter, { type TestStats } from '@wdio/reporter';

private readonly defaultOutputDir;
private filename;
private testStats;
constructor(reporterOptions: ReporterConfigOptions);
onRunnerStart(): void;
onTestEnd(testStats: TestStats): void;
onRunnerEnd(): void;
onRunnerEnd(runner: any): void;
private setFilename;

@@ -32,0 +30,0 @@ private updateCtrfTotalsFromTestStats;

@@ -13,3 +13,2 @@ "use strict";

this.defaultOutputDir = 'ctrf';
this.filename = this.defaultOutputFile;
this.reporterConfigOptions = {

@@ -63,13 +62,17 @@ outputFile: (_a = reporterOptions === null || reporterOptions === void 0 ? void 0 : reporterOptions.outputFile) !== null && _a !== void 0 ? _a : this.defaultOutputFile,

}
onRunnerEnd() {
onRunnerEnd(runner) {
this.ctrfReport.results.summary.stop = Date.now();
const specFilePath = runner.specs[0];
const pathParts = specFilePath.split(path.sep);
const uniqueIdentifier = pathParts.slice(-2).join('-').replace(/\.(js|ts)$/, '');
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
this.reporterConfigOptions.outputFile = `report-${uniqueIdentifier}-${timestamp}.json`;
this.writeReportToFile(this.ctrfReport);
console.log(JSON.stringify(this.reporterConfigOptions));
}
setFilename(filename) {
if (filename.endsWith('.json')) {
this.filename = filename;
this.reporterConfigOptions.outputFile = filename;
}
else {
this.filename = `${filename}.json`;
this.reporterConfigOptions.outputFile = `${filename}.json`;
}

@@ -76,0 +79,0 @@ }

{
"name": "wdio-ctrf-json-reporter",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

@@ -5,0 +5,0 @@ "repository": {

@@ -73,3 +73,3 @@ # Webdriverio JSON Reporter

You'll find a JSON file named `ctrf-report.json` in the `ctrf` directory.
In the `ctrf` directory, you will find the JSON report files generated for each spec.

@@ -76,0 +76,0 @@ ## Reporter Options

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