Skip to content

solve#308

Open
igols wants to merge 2 commits into
mate-academy:masterfrom
igols:develop
Open

solve#308
igols wants to merge 2 commits into
mate-academy:masterfrom
igols:develop

Conversation

@igols

@igols igols commented Mar 21, 2026

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/fillTank.test.js Outdated
expect(customer.money).toBe(2500);
});

it('should fill to max capacity sf amount is lager than free space', ()=> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a couple of typos in the test description: sf should be if and lager should be larger.

Comment thread src/fillTank.test.js
Comment on lines +30 to +34
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);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants