Closed aamay001 closed 4 years ago
Can you please explain the issue in detail.
Can you please explain the issue in detail.
You can add any test that you'd like to add for Components (i.e. rendering tests, etc.) Use Jest.
@aamay001 I’m going to take this on.
@aamay001 How does one run the: VisibilityChanger.test.js ?
Still learning learning the difference between tests.
@aamay001 ~How does one run the: VisibilityChanger.test.js ?~
Still learning learning the difference between tests.
just for reference, it's npm run test
@aamay001 @oriane212 @tsargent
Working away on CodeEditor test and having the troubles with determining if the text 'Code Editor' is between the DIV tags.
I've put two links on my commit I'll have to read some more later.
Any ideas what I'm doing wrong?
You're going one child too deep. It should just be:
expect(menu.firstChild.textContent).toBe('Code Editor');
@paulywill
Hi Paul,
If you're up for it, that's okay with me. Personally, I have not used snapshots, although, I have read about them. If you see a need to using them, go ahead and submit a PR that includes them and I'll make sure to review.
Thanks,
Andy
On Fri, Jan 24, 2020 at 1:07 PM Paul Gamble notifications@github.com wrote:
@aamay001 https://github.com/aamay001 Is there any interest in us creating snapshots?
I'm just learning that it's tricky if not shallow https://www.robinwieruch.de/jest-snapshot-shallow-render?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aamay001/react-resume/issues/36?email_source=notifications&email_token=AG3UMHIKL6LR5SS4RKTF5WLQ7NJ7JA5CNFSM4ICPIE22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4DDGY#issuecomment-578302363, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3UMHK3LZIMZ6DCJUVFUPDQ7NJ7JANCNFSM4ICPIE2Q .
@aamay001 Resolved the snapshot for the CodeEditor.
Having a gotcha with testing componentDidUpdate
to get full code coverage.
Every example I've looked at suggested shallow mounting using Enzyme.
The react-ace is also adding some complexity, trying to refer some tests from that project.
New Issues being added for testing with Crypress.
Write tests.