CSS Unit Testing

前端 未结 9 1735
面向向阳花
面向向阳花 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:34

    Unit Testing CSS, depends on your framework and your approach to CSS.

    Questions to ask :

    Testing for a given class in your CSS e.g, Assert.IsNotNull

    Get CSS property and verify its attributes.

    Firstly, I would ascertain, if CSS file exist, then look for specific class then look for attributes inside the specified class.

    I have experienced a missing class during my regression test and managed to fix it immediately from previous findings.

提交回复
热议问题