Add tests for molecules checkbox form field#69
Conversation
Codecov Report
@@ Coverage Diff @@
## main #69 +/- ##
==========================================
+ Coverage 25.66% 25.77% +0.11%
==========================================
Files 51 51
Lines 900 900
Branches 209 209
==========================================
+ Hits 231 232 +1
Misses 662 662
+ Partials 7 6 -1
Continue to review full report at Codecov.
|
brandongregoryscott
left a comment
There was a problem hiding this comment.
Just some minor feedback @SaidShah 👍
| checked={false} | ||
| label={expected} | ||
| onChange={() => {}} | ||
| errorMessage={testErrorMessage} |
There was a problem hiding this comment.
Nitpick - alphabetization
|
|
||
| test("when errorsMessage prop set, renders with error message", () => { | ||
| // Arrange | ||
| const expected = faker.random.words(); |
There was a problem hiding this comment.
Same comment from your other PR - since we're not actually asserting on this value (or even using it, really), I would probably just name this label.
| test("when onChange set, calls handler upon change", () => { | ||
| // Arrange | ||
| let isChecked = false; | ||
| const expected = faker.random.word(); |
There was a problem hiding this comment.
Same as above ☝️ while it's being used here, expected leads me to believe we're looking for this value to be set somewhere in the assert step.
There was a problem hiding this comment.
Thanks for the feedback. I have updated the PR if you would like to take another look.
Closes #23