Tests for Metric-Imperial Converter failing

Tell us what’s happening:
The Test #5 of the above mentioned challenge is failing, no matter what. In my opinion the provided solution returns exactly the same result as metric-imperial-converter.freecodecamp.rocks/. It would be very helpful to show the reason WHY it is failing.

solution: https://converter.sahlix.ga

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46.

Challenge: Metric-Imperial Converter

Link to the challenge:

The test is failing due to a rounding difference between the answer you are returning and what the test is expecting. The test is converting 10km and expecting to see 6.21373 as the answer. Your implementation is returning 6.21372

You can look at github to see the test implementations for any project. The tests for this project are located here

1 Like

Ah, thank you so much. Thanks also for pointing me to the test code. That will help a lot in future courses!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.