- React
- You Gotta Love Frontend
- 2019 Lithuania
- Don’t Believe the Rumors Writing Tests for CSS is Possible
Don’t Believe the Rumors Writing Tests for CSS is Possible
Gil Tayar at You Gotta Love Frontend 2019 Lithuania
You know that fear. The fear of changing something in your CSS. Deleting a CSS rule is a lesson in getting yourself to calm down, telling yourself that it’s OK, you are absolutely _sure_ that deleting that rule won’t change anything. And only manual testing can assuage that fear. And yet, even then, you’re still frightened that you haven’t checked _everything_, and that you missed something. Not to mention that it’s amazingly boring. Never fear again! Testing your CSS code, testing the _visual_ aspects of your code, is now possible, and I will show how. A slew of new Saas tools have come to the forefront which enable us to write tests that check that everything is the same that it was (even if we moved from BEM to CSS-in-JS). So grab that keyboard, refactor your CSS, because writing tests for it is now possible! Slides: https://bit.ly/2Z7y1l8