FCC test seems to have a bug

Tell us what’s happening:
So on the metric imperial converter project I seem to have done everything right as you can see on my replit.
But still I get this one error when I submit it:
Your return will consist of the initNum , initUnit , returnNum , returnUnit , and string spelling out units in the format '{initNum} {initUnitString} converts to {returnNum} {returnUnitString}' with the result rounded to 5 decimals

If you look at the console, it says one string doesn’t correspond to another, but it doesn’t actually show the full string. But when I test it separately so I can see it fully the result is:
“string”:“2 miles converts to 3.21868 kilometers”
which is exactly the string it was testing for, so maybe it’s actually testing the truncated one?

Your project link(s)

solution: boilerplate-project-metricimpconverter - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 Edg/107.0.1418.52

Challenge: Quality Assurance Projects - Metric-Imperial Converter

Link to the challenge:

1 Like

I do not know why the returned string was truncated, but it is enough to see that you have an extra space that should not be there:

'2 miles converts to 3.21868  kilomete…'

When you fix that, you will be able to pass all of the tests.

1 Like

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