creativetimofficial / material-tailwind

@material-tailwind is an easy-to-use components library for Tailwind CSS and Material Design.
https://material-tailwind.com/
MIT License
3.71k stars 317 forks source link

idea: add section about testing with jest #228

Open hesxenon opened 1 year ago

hesxenon commented 1 year ago

since material-tailwind components make use of the web animations API (which seems to be unsupported by jsdom) I think quite a few users might run into issues when testing interactions with components that use this component library.

Maybe it would make sense to include a little section about how to set up get jest working with material-tailwind?

E.g. by hinting to https://www.npmjs.com/package/jsdom-testing-mocks#mock-web-animations-api (no affiliation, but seems to work for me)

sajadevo commented 1 year ago

Hi @hesxenon,

Thanks for your suggestion, I'll add ASAP with a complete guide.

Cheers, Sajad