How to Perform Unit Tests for UI Components
Briefly

I think I have written articles about the problem of writing unit tests for UI components.Here're a few articles that I wrote that lead to the conclusion of this article here:
So the main issue can be demonstrated via the following component snippet:
In a unit test, we want to check the return elements from the render of the component; however, there are too many hidden dependencies we don't see from the explicit interface of App function, including:

(1) global dom-related dependencies
(2) API-related dependencies
(3) framework wise dependencies


Believe it or not, most of us can figure out one or two of the above hidden dependencies, but not all of them.
Read at Medium
[
add
]
[
|
|
]