Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anichols-ht opened this issue Jun 4, 2024 · 0 comments
Open

Comments

@anichols-ht
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant