You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cypress-ctrf-json-reporter

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version

to
0.0.9

5

dist/generate-report.d.ts

@@ -17,2 +17,7 @@ import { type CtrfEnvironment, type CtrfTest } from '../types/ctrf';

buildNumber?: string | undefined;
buildUrl?: string | undefined;
repositoryName?: string | undefined;
repositoryUrl?: string | undefined;
branchName?: string | undefined;
testEnvironment?: string | undefined;
}

@@ -19,0 +24,0 @@ export declare class GenerateCtrfReport {

29

dist/generate-report.js

@@ -8,3 +8,3 @@ "use strict";

constructor(reporterOptions) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
this.reporterName = 'cypress-ctrf-json-reporter';

@@ -30,2 +30,7 @@ this.defaultOutputFile = 'ctrf-report.json';

buildNumber: (_l = reporterOptions === null || reporterOptions === void 0 ? void 0 : reporterOptions.buildNumber) !== null && _l !== void 0 ? _l : undefined,
buildUrl: (_m = reporterOptions === null || reporterOptions === void 0 ? void 0 : reporterOptions.buildUrl) !== null && _m !== void 0 ? _m : undefined,
repositoryName: (_o = reporterOptions === null || reporterOptions === void 0 ? void 0 : reporterOptions.repositoryName) !== null && _o !== void 0 ? _o : undefined,
repositoryUrl: (_p = reporterOptions === null || reporterOptions === void 0 ? void 0 : reporterOptions.repositoryUrl) !== null && _p !== void 0 ? _p : undefined,
branchName: (_q = reporterOptions === null || reporterOptions === void 0 ? void 0 : reporterOptions.branchName) !== null && _q !== void 0 ? _q : undefined,
testEnvironment: (_r = reporterOptions === null || reporterOptions === void 0 ? void 0 : reporterOptions.testEnvironment) !== null && _r !== void 0 ? _r : undefined,
};

@@ -54,6 +59,6 @@ this.ctrfReport = {

this.ctrfEnvironment = {};
if (((_m = this.reporterConfigOptions) === null || _m === void 0 ? void 0 : _m.outputFile) !== undefined)
if (((_s = this.reporterConfigOptions) === null || _s === void 0 ? void 0 : _s.outputFile) !== undefined)
this.setFilename(this.reporterConfigOptions.outputFile);
if (!fs.existsSync((_o = this.reporterConfigOptions.outputDir) !== null && _o !== void 0 ? _o : this.defaultOutputDir)) {
fs.mkdirSync((_p = this.reporterConfigOptions.outputDir) !== null && _p !== void 0 ? _p : this.defaultOutputDir, { recursive: true });
if (!fs.existsSync((_t = this.reporterConfigOptions.outputDir) !== null && _t !== void 0 ? _t : this.defaultOutputDir)) {
fs.mkdirSync((_u = this.reporterConfigOptions.outputDir) !== null && _u !== void 0 ? _u : this.defaultOutputDir, { recursive: true });
}

@@ -158,2 +163,18 @@ this.setEventHandlers();

}
if (reporterConfigOptions.buildUrl !== undefined) {
this.ctrfEnvironment.buildUrl = reporterConfigOptions.buildUrl;
}
if (reporterConfigOptions.repositoryName !== undefined) {
this.ctrfEnvironment.repositoryName = reporterConfigOptions.repositoryName;
}
if (reporterConfigOptions.repositoryUrl !== undefined) {
this.ctrfEnvironment.repositoryUrl = reporterConfigOptions.repositoryUrl;
}
if (reporterConfigOptions.branchName !== undefined) {
this.ctrfEnvironment.branchName = reporterConfigOptions.branchName;
}
if (reporterConfigOptions.testEnvironment !== undefined) {
this.ctrfEnvironment.testEnvironment =
reporterConfigOptions.testEnvironment;
}
}

@@ -160,0 +181,0 @@ hasEnvironmentDetails(environment) {

2

package.json
{
"name": "cypress-ctrf-json-reporter",
"version": "0.0.8",
"version": "0.0.9",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -13,2 +13,20 @@ # Cypress JSON Test Results Report

## We need your help
We believe CTRF can save **a lot** of time for engineers, a single data serialisation report, well structured, community driven and works with any framework. For over 30s years software engineers have used a de facto data serialisation report, you know the one! But we feel it’s time to modernise.
The only way we can grow CTRF is with your help and the support of the software engineering community.
## How can you help?
- Join and build with us! We are looking for [contributors](https://github.com/ctrf-io), get involved in this early stage project. All contributions are welcome.
- Give this repository a star ⭐⭐⭐⭐⭐⭐
- Follow the CTRF [GitHub organisation](https://github.com/ctrf-io)
- Clap for our medium articles (30 times each) 👏
- Share, share share! Discord, Reddit, Twitter, LinkedIn, Slack, Teams, whereever! - please share our [libraries](https://github.com/orgs/ctrf-io/repositories), our [homepage](https://www.ctrf.io/), our [Medium articles](https://medium.com/@ma11hewthomas)
- Maybe even write a blog about us!
- Try our [tools](https://github.com/orgs/ctrf-io/repositories)
**Thank you so much!!**
## Features

@@ -119,17 +137,20 @@

new GenerateCtrfReport({
on, {
outputFile: 'custom-name.json', // Optional: Output file name. Defaults to 'ctrf-report.json'.
outputDir: 'custom-directory', // Optional: Output directory path. Defaults to 'ctrf'.
minimal: true, // Optional: Generate a minimal report. Defaults to 'false'. Overrides screenshot and testType when set to true
testType: 'e2e', // Optional: Specify the test type (e.g., 'api', 'e2e'). Defaults to 'e2e'.
appName: 'MyApp', // Optional: Specify the name of the application under test.
appVersion: '1.0.0', // Optional: Specify the version of the application under test.
osPlatform: 'linux', // Optional: Specify the OS platform.
osRelease: '18.04', // Optional: Specify the OS release version.
osVersion: '5.4.0', // Optional: Specify the OS version.
buildName: 'MyApp Build', // Optional: Specify the build name.
buildNumber: '100', // Optional: Specify the build number.
}
on,
outputFile: 'custom-name.json', // Optional: Output file name. Defaults to 'ctrf-report.json'.
outputDir: 'custom-directory', // Optional: Output directory path. Defaults to 'ctrf'.
minimal: true, // Optional: Generate a minimal report. Defaults to 'false'. Overrides screenshot and testType when set to true
testType: 'e2e', // Optional: Specify the test type (e.g., 'api', 'e2e'). Defaults to 'e2e'.
appName: 'MyApp', // Optional: Specify the name of the application under test.
appVersion: '1.0.0', // Optional: Specify the version of the application under test.
osPlatform: 'linux', // Optional: Specify the OS platform.
osRelease: '18.04', // Optional: Specify the OS release version.
osVersion: '5.4.0', // Optional: Specify the OS version.
buildName: 'MyApp Build', // Optional: Specify the build name.
buildNumber: '100', // Optional: Specify the build number.
buildUrl: 'https://ctrf.io', // Optional: Specify the build url.
repositoryName: 'ctrf-json', // Optional: Specify the repository name.
repositoryUrl: 'https://gh.io', // Optional: Specify the repository url.
branchName: 'main', // Optional: Specify the branch name.
testEnvironment: 'staging', // Optional: Specify the test environment (e.g. staging, production).
})
```

@@ -136,0 +157,0 @@