Tuesday, June 16, 2015

Testing a Sass Function in 5 Minutes

The other day, I was playing with the include-media library from Eduardo Bouças and I wanted to quickly test a function I built so I started writing a little mixin to help me test a lot of different scenarios. After a couple of minutes, I came up with the most minimalistic Sass testing engine you could possibly get.

While this article might be slightly technical, I believe it can be helpful to many people as testing is should be the responsibility of every developer. Also, when going through things one after the other, you'll see that it actually is not that hard to understand. :)

Creating a dummy function to test

Everything starts with a function to test. For our purpose, I suggest we go with a very simple function. Let's say, a function to double a number.

Continue reading %Testing a Sass Function in 5 Minutes%


by Hugo Giraudel via SitePoint

No comments:

Post a Comment