Why I Unit Test My Sass: Mixins 🧪by@spiderpig86

Why I Unit Test My Sass: Mixins 🧪

tldt arrow
Read on Terminal Reader🖨️

Too Long; Didn't Read

In a previous post, I discussed why Sass unit testing is a thing and why you may want to incorporate it into your project. Unit testing Sass functions isn’t too complicated but what about mixins? Testing-wise, it is quite similar. Let’s create a simple viewport mixin similar to the `screen-above()` mixin defined in [Cirrus]. The mixin below will apply styles if it is larger than the specified breakpoints. An error is thrown if the breakpoint does not exist.

Company Mentioned

Mention Thumbnail
featured image - Why I Unit Test My Sass: Mixins 🧪
Stanley Lim HackerNoon profile picture

@spiderpig86

Stanley Lim

Learn More
LEARN MORE ABOUT @SPIDERPIG86'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa