Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
cypress-html-validate
Advanced tools
Validates HTML using html-validate
.
It automatically fetches the active source markup from the browser and validates, failing the test if any validation errors is encountered.
cypress/plugins/index.js
:const htmlvalidate = require("cypress-html-validate/dist/plugin");
module.exports = (on) => {
htmlvalidate.install(on);
};
cypress/support/index.js
:import "cypress-html-validate/dist/commands";
it("should be valid", () => {
cy.visit("/my-page.html");
cy.htmlvalidate();
});
html-validate
and the plugin can configured in cypress/plugins/index.js
:
/* html-validate configuration */
const config = {
rules: {
foo: "error",
},
};
/* plugin options */
const options = {
exclude: [],
include: [],
formatter(messages) {
console.log(messages);
},
};
htmlvalidate.install(on, config, options);
exclude: string[]
A list of selectors to ignore errors from. Any errors from the elements or any descendant will be ignored.
include: []
A list of selectors to include errors from. If this is set to non-empty array only errors from elements or any descendants will be included.
formatter
(messages: ElementMessage[]): void
Custom formatter/reporter for detected errors.
Default uses console.table(..)
to log to console.
Set to null
to disable.
FAQs
Cypress plugin for html-validate
The npm package cypress-html-validate receives a total of 4,625 weekly downloads. As such, cypress-html-validate popularity was classified as popular.
We found that cypress-html-validate 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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.