react+tailwindcss

Solution retrospective
Compared to my last submission, I breaked the app.tsx into several testable components and practiced using vitest to do unittest
Please log in to post a comment
Log in with GitHubCommunity feedback
- @ClaudiaRamirezD
Great job! Your current test checks that the BillInput component renders and updates the value correctly, which is great. However, it doesn't account for edge cases like negative numbers. Right now, users can enter negative values, which likely shouldn't be allowed.
To improve this, I suggest:
Updating the component logic to prevent or sanitize negative values (e.g., by rejecting them or converting them to zero).
Adding a new test case to ensure that negative inputs are either ignored or handled gracefully.
Optionally, you could provide visual feedback to the user if they try to enter an invalid value.
Adding these checks will help improve both the reliability and the user experience of your calculator.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord