-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Milestone
Description
The final Post Lists spec has ~15 expect() statements. If one were to fail, the entire block would fail, but wouldn't necessarily indicate WHICH expect was failing.
If the spec is determining that the component "should test that 2 posts are rendered in the component", then the expect should verify that a count/length is "2". Any other expect statement(s) should be relocated to a new spec that describes what is being checked.
// for example
it('should display "Latest Posts" as a title', function () {
// spec setup if necessary
// ...
expect(componentTitle[0].textContent).toBe('Latest Posts');
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels