CSS Unit Testing

前端 未结 9 1711
面向向阳花
面向向阳花 2020-12-24 05:35

A few quick searches discovered that I\'m obviously not the first person to have the thought \"Can I unit test my CSS?\".

I\'m wondering if anyone

9条回答
  •  甜味超标
    2020-12-24 06:14

    You can use PhantomCSS for automatic visual comparison. And then you can create CSS module unit test page that only loads the base CSS styles and displays the component in all it's states, but does not load CSS from other components. And then you can compare it to full CSS file with all modules loaded.

提交回复
热议问题