Quality Assurance Projects - Metric-Imperial Converter

Hello, I’m trying to finish the user stories of Metric-Imperial Converter before proceeding to the unit tests, but I can’t complete one user story, specifically this one:

I’m getting the right initUnit and returnUnit according to what i see in the res json

In synthesis I can’t figure out what’s wrong with my solution :frowning:
Any kind of help/clues would be really helpfull, thanks in advance

Replit project link

Your browser information:

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

Challenge: Quality Assurance Projects - Metric-Imperial Converter

Link to the challenge:

Without looking at your code, I can see that ‘gallon’ is spelled incorrectly. Is that perhaps the issue?

1 Like

Good guess, changed it, but having the same result

You are returning your initNum as a string. You may need to coerce it to a number. You could do this with a unary operator.

Solved it, i was returning init unit as is instead of lower case, thank you anyway for your time and possible solutions, have a great day!

Now having this problem, idk what to do

Add this to the very bottom of your 2_functional-tests.js file:

after(function() {
  chai.request(server)
  .get('/')
});

The tests invariably crash the repl. This restarts the repl after it crashes.
You may need to do this for all of your QA project repls.

Thank you, you’ve saved me a couple of hours :pray: