solve#308
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Good work on this test suite! It's well-structured and covers most of the requirements. However, I'm requesting one change before this can be approved. Your tests are missing a key scenario for the 'do not pour if less than 2 liters' rule. Please add a test for the case where the pourable amount is limited by the customer's money, and that calculated amount ends up being less than 2 liters. In this situation, no fuel should be poured and no money charged. Also, there's a small typo (sf/lager) in a test description that could be fixed. Please add the missing test case, and this will be ready for approval!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| expect(customer.money).toBe(2500); | ||
| }); | ||
|
|
||
| it('should fill to max capacity sf amount is lager than free space', ()=> { |
There was a problem hiding this comment.
There are a couple of typos in the test description: sf should be if and lager should be larger.
| it('should not fill if resulting amount is less than 2 liters', () => { | ||
| fillTank(customer, fuelPrice, 1.99); | ||
| expect(customer.vehicle.fuelRemains).toBe(8); | ||
| expect(customer.money).toBe(3000); | ||
| }); |
There was a problem hiding this comment.
This test correctly covers the case where the requested amount is less than 2 liters. However, a key scenario is missing: when the amount to be poured is limited by the customer's money and that calculated amount is less than 2 liters. Please add a test for this case.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this submission! I am approving your solution. You've successfully addressed the previous feedback by adding the missing test case for the scenario where the customer's money limits the fuel amount to less than two liters. The test suite is now comprehensive, well-structured, and fully covers all requirements. Great job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.