-
Notifications
You must be signed in to change notification settings - Fork 0
Math Magicians: tests #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Component tested Calculator Home RowButtons operate
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.
STATUS: REQUIRED CHANGES ♻️♻️
Hi @PabloBona and @grauJavier
Good job so far! I know you worked hard to implement this project, I really appreciate the effort you put in! But there are some issues that you still need to work on to go to the next project but you are almost there!
To highlight 🍾
- All linters are passing ✔️
- Good commit history ✔️
- Your design looks good 💯 ✔️
- Good PR description ✔️
- Follow Gitflow ✔️
Required changes ♻️ ♻️
- Check the comments under the review.
Optional suggestions
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please ping me @tresorsawasawa when you comment so I can receive the notification or use slack with the same name.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
src/test/Calculator.test.js
Outdated
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
import Calculator from '../components/Calculator'; | ||
|
||
describe('Calculator component unit test', () => { | ||
test('Calculator Component Renders Properly', () => { | ||
const tree = renderer.create(<Calculator />).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
}); |
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.
-
Good job for adding some of the tests required for the project such as all the functionalities & scenarios of the
operate.js
andcalculate.js
modules should be covered using Jest, usage of Jest snapshots for testing all the components. However I noticed that you are missing another requirement for this project.
You should ensure that you also useReact Testing Library to simulate user interaction of your application
, Right now , the feature of simulating user interaction is not used in any component such as in theCalculator.jsx
,Home.jsx
,Qusotes.jsx
,... make sure you add it. To help you how to do so, I suggest you refer this article for documentation -
As required for the project, kindly ensure that all your tests are passing as there is one test failing for your
App.js
component.
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.
I tried the App.test.js again and it runs on my PC with Windows and on my partner's PC with Windows too.
Maybe you use Unix Os and the config problem is not mine.
You are correct that the React Testing Library was missing to simulate user interaction.
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.
Approved 🟢
Hi @PabloBona & @grauJavier,
Your project is complete! There is nothing else to say other than... it's time to merge it
Congratulations! 🎉
Highlights ✔️
- All unit tests are passing as expected ✅
- All linter checks are passing ✅
- Application works as expected ✅
- Pull request has a descriptive summary and title ✅
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
Update Readme
Change Made: