Meta Refresh 2015

The web in your pocket

Leena S N

Leena S N


Unit Testing CSS

Submitted Feb 8, 2015

This workshop gives an overview of unit testing, especially Test Driven Development and also shows that CSS can also be unit tested.


Those who have written unit tests would know how much confidence it gives to the developers and how much it impacts maintainability due to frequent refactoring. And needless to say the faster feedback cycle it gives by following the “Red-Green-Refactoring”.

But for CSS usually the practice is to rely on end to end tools such as Selenium, which are brittle and slow.

Session Format

It will be a live coding session, based on the Sample setup which uses:

  • Quixote - Library for Unit Testing CSS
  • Mocha - Javascript Testing Framework which Quixote uses for running the tests in browser
  • Karma - the Test Runner, to run the tests across multiple web browsers, including mobile browsers

The format of the session will be:

  • Introduction to Unit Testing, specifically TDD, why its so important
  • Unit test [2-3 trivial cases where CSS have logic, such as display block/none, position attribute with fixed value etc.]
  • Test Driving some of the CSS3 tricks, mentioned in
  • Introduction to tools like wraith, which can be used in complement to unit testing, for end to end testing including responsiveness
  • Suggestions on how to help the participants apply the above learnings on their daily work
  • Q&A

The session is open to anyone who has basic knowledge of CSS, Javascript and Git. If you are struggling to have high confidence about the reliability of every commits that you make to your repository, this session is for you. This session will help you to regain the confidence to push every commit to production.

Speaker bio

Leena is the Head of Engineering @ Multunus. She was bitten by the TDD bug a couple of years ago. Having done enough TDD in Ruby/Rails, Javascript and Android, she’s moved onto Continuous Delivery (CD) in a big way - even spoke about CD at DroidCon India 2011 and AgileIndia 2012. During the last couple of years, she had conducted workshops on TDD and CD during JSFoo, DroidCon and RootConf.


{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

Meta Refresh is an umbrella forum for conversations about different aspects of design and product including: UX and interaction design CMS, content management, publishing and content marketing Information architecture more