Quality Assurance Projects - Metric-Imperial Converter

Tell us what’s happening:
Describe your issue in detail here.

In the api.js I printed all the request test cases fcc used. In my code, I also printed the returned value if the input is invalid. Here are the output. I think
1min
invalid unit
1//2gal
invalid number
1//2min
invalid number and unit
looks correct but my code is not passing the three related tests.
Here is the full list of inputs:
1gal
10gal
1l
10l
1lbs
10lbs
1kg
10kg
1mi
10mi
1km
10km
1gal
10L
1l
10KM
1min
invalid unit
1//2gal
invalid number
1//2min
invalid number and unit
mi
1/5mi
1.5/7km
3/2.7km
2mi

Does anyone know why?

Thanks a lot.

Your project link(s)

solution: boilerplate-project-metricimpconverter - Replit

Your browser information:

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

Challenge: Quality Assurance Projects - Metric-Imperial Converter

Link to the challenge:

The test is not expecting a 400 response.

1 Like

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