Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cypress-lens
Advanced tools
Documentation | Changelog | Roadmap
Developed in
Join us, we're hiring.
Based on Cypress Visual Regression
Module for visual regression testing and reporting for Cypress.
Install:
$ npm install cypress-lens
Add the following config to your cypress.config.js file:
const { defineConfig } = require("cypress");
const getCompareSnapshotsPlugin = require("cypress-visual-regression/dist/plugin");
module.exports = defineConfig({
screenshotsFolder: "./cypress/snapshots/actual",
trashAssetsBeforeRuns: true,
video: false,
e2e: {
setupNodeEvents(on, config) {
getCompareSnapshotsPlugin(on, config);
},
},
});
Add the command to cypress/support/commands.js:
const compareSnapshotCommand = require("cypress-visual-regression/dist/command");
compareSnapshotCommand();
Make sure you import commands.js in cypress/support/e2e.js:
import "./commands";
If you're using TypeScript, use files with a .ts
extension, as follows:
cypress/cypress.config.ts
import { defineConfig } from "cypress";
import getCompareSnapshotsPlugin from "cypress-visual-regression/dist/plugin";
export default defineConfig({
env: {
screenshotsFolder: "./cypress/snapshots/actual",
trashAssetsBeforeRuns: true,
video: false,
},
e2e: {
setupNodeEvents(on, config) {
getCompareSnapshotsPlugin(on, config);
},
},
});
cypress/support/commands.ts
import compareSnapshotCommand from "cypress-visual-regression/dist/command";
compareSnapshotCommand();
cypress/tsconfig.json
{
"compilerOptions": {
"types": [
"cypress",
"cypress-visual-regression"
]
}
}
FAQs
Module for visual regression testing and reporting in Cypress
The npm package cypress-lens receives a total of 985 weekly downloads. As such, cypress-lens popularity was classified as not popular.
We found that cypress-lens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.