My project is failing on 2 tests (which to me does not make sense). The tests that are failing are these:
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'
. What really isn’t making sense is that the 2 tests not passing are inside this 3 part statement:
res.send( 'invalid number and unit' );
} else if (!initNum ) {
res.send( 'invalid number' );
} else if (!initUnit) {
res.send( 'invalid unit' );
}
I’ve spent the past 2 hours trying to modify code and nothing passes, and what is more infuriating is I can see on my own screen that it is definitely returning those items. I tried changing to return as a json object, still will not pass. Why does the third return just fine but the other two don’t?
code can be found here:
https://glitch.com/edit/#!/bloom-excessive-runner
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
Challenge: Metric-Imperial Converter
Link to the challenge: