DEV Community

Discussion on: Lets Build Web Components! Part 3: Vanilla Components

Collapse
 
ld75 profile image
ld75

Thanks for the article. Did you manage to test your components with jest? It seems not to support custom-elements. The way I could make it work was to replace jsdom by jest-electron but then console.log doesn't write anything in the test terminal.

Collapse
 
bennypowers profile image
Benny Powers 🇮🇱🇨🇦

You're correct. Until jsdom supports more of the DOM API, testing with jest is not the best.

Take a look at open-wc.org/testing