https://cypress.io logo
Testing vanilla JS web components
# i-need-help
m
Is it possible to setup cypress to test a bog standard web component? No Typescript (yet!), Webpack, or any framework! Just a web component as boring as:
Copy code
class Default extends HTMLElement {
    constructor() {
        super();

        this.attachShadow({ mode: "open" });
        this.shadowRoot.textContent = "Hello, World!";
    }
}
customElements.define('acme-default', Default); I've literally first installed Cypress this morning. I've gone through getting started. If I use the app (from
npx cypress open
) and choose the component testing, it asks if I want to use one of the frameworks to do this. Then moves onto picking web pack. I've struggled to find what I need for this simple scenario. Thanks Paul