3 ms·
A test looks like this: Cactus.expect("p", "font-size").toEqual("12px"); That doesn't make any sense. It's exactly the same as p { font-size: 12px; }
by ricardobeat 14y ago
A test looks like this:
Cactus.expect("p", "font-size").toEqual("12px");
That doesn't make any sense. It's exactly the same as
p { font-size: 12px; }
just in a more verbose language. CSS has no logic, just rules. Rules are already "tests" for themselves.
Visual matching is whole other story that might be useful. Set some tolerance for deviations that trigger alarms on deploy - that could be a lifesaver for IE and mobile support.
- cleverjake 14y agoYou wouldn't be using it in this case. This would be being used to test inheritance (p {font-size: 10px} #aPTag {font-size: 12px} etc), and the like. If you work on any large scale site, there can be all kinds of things that crop up because a dev thinks they aren't going to impact anything by removing a tag in a class selector.