
In general, units are tested using only the public interface of the unit (aka “public API” or “surface area”). This is referred to as black box testing. Black box testing leads to less brittle tests, because the implementation details of a unit tend to change more over time than the public API of the unit. If you use white box testing, where tests are aware of implementation details, any change to the implementation details could break the test, even if the public API continues to function as expected. In other words, white-box testing leads to wasted rework.
…nder each component, which will isolate the component completely, even from styles defined globally (global styles D…nder each component, which will isolate the component completely, even from styles defined globally (global styles DO pierce components with emulated view encapsulation).