Open Samy-33 opened 2 years ago
@Samy-33 there are many things in PR #88 totally new to me . Any learning resource you may suggest . I have found some videos on YouTube but don't know how useful they will be ....
https://reactjs.org/docs/testing.html should help. Read about general topics for testing like mocks, spies, difference between unit tests and integration tests.
Let me know if you want a walkthrough of these tests.
https://reactjs.org/docs/testing.html should help. Read about general topics for testing like mocks, spies, difference between unit tests and integration tests.
Let me know if you want a walkthrough of these tests.
I have some doubts in Login.test.tsx
if you are available
From LoginRedirect/index.tsx
`const errQuery = new URLSearchParams({error: 'Please try again later!'});
const code = new URLSearchParams(window.location.search).get('code');
if (!code) {
return navigate('/');
} `
If there is not code still redirecting to home('/') ?
Should redirect to /login
with appropriate error message :)
Good catch.
To get an idea how to write tests look at the following PR: #88