-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
Codecov Report
@@ Coverage Diff @@
## master #219 +/- ##
=========================================
+ Coverage 99.16% 99.2% +0.04%
=========================================
Files 79 82 +3
Lines 1076 1136 +60
Branches 219 238 +19
=========================================
+ Hits 1067 1127 +60
Misses 9 9
Continue to review full report at Codecov.
|
let wrapper | ||
|
||
describe('when 7 pages are passed and the active page is 3', () => { | ||
beforeAll(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for beforeAll
as all the tests only differ by assertions. It's actually a single test with multiple assertions. The "should render the ..." messages should actually be custom assertion messages. Unfortunately, Jest doesn't support this standard feature out of the box, but the jest-expect-message
package solves this problem.
Apart from the tests to appear more complex than they really are, mounting the same stateless component 5 times just to make 5 assertions can affect the duration of the whole test suite. Especially if we do it everywhere, which we do. Just in this PR there are 24 mount
calls, when it only could be 7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The component it's mounted only once as beforeAll
is executed once for all the test cases.
& + & { | ||
margin-left: ${SPACING.SCALE_1}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add this to the adjacent component rather than using SASS selectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was changed following comment added by @peterhudec #218 (comment)
generated from commit 168de37
🎉 This PR is included in version 2.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This component was extracted from the collection list and will replace it in a follow-up PR.