enzymejs / enzyme-matchers

Jasmine/Jest assertions for enzyme
MIT License
892 stars 116 forks source link

jest-enzyme toHaveClassName does not work with some tailwind classes #379

Open anichols-ht opened 2 months ago

anichols-ht commented 2 months ago

I keep running into issues trying to do things like

expect(component).toHaveClassName('hover:bg-primary');

This gives me a message like Expected <div> to have className of ".hover:bg-primary" but instead found "hover:bg-primary". If I try to escape the : I get parsing errors.