Quality Assurance Projects - Metric-Imperial Converter

Tell us what’s happening:

Failing 2 tests despite correct response

You can use fractions, decimals or both in the parameter (ie. 5, 1/2, 2.5/6), but if nothing is provided it will default to 1.

I tried to check the tests input and after trying them they all seems to return the expected value, unfortunately I’m having issue running freecodecamp locally to understand what’s the issue.

Your project link(s)

solution: https://unit-converter-pi.vercel.app/
githubLink: https://github.com/robdll/unit-converter

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Quality Assurance Projects - Metric-Imperial Converter

Link to the challenge:

I do not see this repository.

thanks for pointing that out.
Vercel created the repo as private, It’s now public.
(Error unfortunately persist)

When I enter: 5.4/3lbs into your app, I get:

{"initNum":"1.80000","initUnit":"lbs","returnNum":"0.81647","returnUnit":"kg","string":"1.80000 pounds converts to 0.81647 kilograms"}

If you look at the example project with the same input, there are no extra zeros after the 1.8:

Nice catch.
I have removed the extra zeros but the test still fails :frowning:

I just noticed I’m also returning a string for returnNum, gonna check that too

Returning a number solves that issue!