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-ct-custom-elements
Advanced tools
Framework definition for testing custom elements (web components) in Cypress component testing
A Cypress Framework Definition for testing your custom elements (web components). It simply puts your custom element into the HTML. No other actions are triggered.
To use this framework, first install it.
npm install cypress-ct-custom-elements
Next, modify your cypress.config.ts
(or your own config if not using TypeScript) and set the framework.
import { defineConfig } from 'cypress';
export default defineConfig({
component: {
devServer: {
bundler: 'vite',
framework: 'cypress-ct-custom-elements',
includeShadowDom: true
}
}
});
Finally, add a test file, such as cypress/component/basic.cy.ts
.
import { YourComponent } from '../../src';
customElements.define('your-component', YourComponent);
describe('basic initialization', () => {
beforeEach(() => {
cy.mount('<your-component></your-component>');
});
it('passes a test that you have to make', () => {
cy.get('your-component').should('.......');
});
});
See the documentation to Learn how to author a Framework Definition for your favorite library!
FAQs
Framework definition for testing custom elements (web components) in Cypress component testing
The npm package cypress-ct-custom-elements receives a total of 0 weekly downloads. As such, cypress-ct-custom-elements popularity was classified as not popular.
We found that cypress-ct-custom-elements demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.