Quality Assurance Projects - Metric-Imperial Converter

Tell us what’s happening:

  • If the number is invalid, returned will be ‘invalid number’.
  • If both the unit and number are invalid, returned will be ‘invalid number and unit’.

I can’t pass these two tests on glitch… When I run the project with localhost:3000 everything works but on glitch it doesn’t . I read in some forum that there is an issue with the tests themselves which causes problems with glitch and replit. So I would like to know if there is a solution to this…

Your project link(s)

solution: Glitch :・゚✧

githubLink: GitHub - GarikHk/metricimpconverter_fcc: Metric-Imperial converter for fCC certification

Your browser information:

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

Challenge: Quality Assurance Projects - Metric-Imperial Converter

Link to the challenge:

Well, I decided to play with your app a little bit to see what kind of response I might get, and when I try to duplicate “invalid number” sometimes I get errors.

When I try the example from the challenge, 3/7.2/4kg, indeed get “invalid number”. But others I tried gives me an error. Take the below one for instance:

https://slow-quixotic-emoji.glitch.me/api/convert?input=37.2/kg

When I try that, meaning a number of 37.2/kg, I believe it should give “invalid number”, but instead I get this:

I had the same error with 3..kg and others, so does seem like there is maybe a bug somewhere in your code that needs to be identified and fixed, and not a problem with glitch or the tests. Hope that helps you find the issues.

Thanks for finding that bug, I’ve fixed it, but unfortunately it was not the problem…

So I found this site codesandbox.io and everything works there. If anyone else is having this problem try using this <3

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