A declarative test defines the desired outcomes and conditions for a test scenario without specifying the step-by-step procedures to achieve them. It focuses on the "what" rather than the "how".
These tests should be easier to read and maintain.
Note that I considered unit testing shouldBeRendered, but it was way too hard to mock because the function interacts so strongly with the DOM. So I stuck with integration tests.
A declarative test defines the desired outcomes and conditions for a test scenario without specifying the step-by-step procedures to achieve them. It focuses on the "what" rather than the "how".
These tests should be easier to read and maintain.
Note that I considered unit testing
shouldBeRendered
, but it was way too hard to mock because the function interacts so strongly with the DOM. So I stuck with integration tests.