Tell us what’s happening:
Describe your issue in details
I have been working on this project and i have passed 21 tests 1 is giving me hard time and i can’t figure out where the error is.
Someone kindly ascertain what could be the problem and guide me where necessary, i will be grateful.
The tricky thing about testing is that you can make tests pass that should fail and vice versa. They need to follow the requirements.
I’d suggest looking at the tests and comparing your responses to the expected values. I don’t think the test output on the submit page is as useful.
Although for this one it does show what is wrong if you compare it to the response.
You can convert ‘gal’ to ‘L’ and vice versa. (1 gal to 3.78541 L)
All incoming units should be accepted in both upper and lower case, but should be returned in both the initUnit and returnUnit in lower case, except for liter, which should be represented as an uppercase ‘L’.
Response:
{"initNum":"1","initUnit":"gal","returnNum":3.78541,"returnUnit":"l","string":"1 gallon(s) converts to 3.78541 litre(s)"}
I’m sure you can figure it out if you do what I told you to. Look at each response and check it against the expected values. Cases should match and strings should match.
All incoming units should be accepted in both upper and lower case, but should be returned in both the initUnit and returnUnit in lower case, except for liter, which should be represented as an uppercase ‘L’.
That’s how far i have reached but as of what you sent to me i have taken time to think,re-think, research and researched but am sadly stuck and i have no option
maybe guide me more
Thank you.
Honestly i have tried using the .toUpperCase() and .toLowerCase() but nothing seems to shift and am just left there lingering in suspense pondering on what next?
Kindly advice.
Thanks
All I will say is you have the tests with the expected values. You can inspect the responses in the browser and compare them to the tests. How you make the responses match the requirements is for you to figure out.
Just as an aside. To get the two last tests (tests of the tests) to pass you have to keep the original outer suite names as they are in the starting code (all tests should be inside them).
For the functional and unit tests i passed and now here comes another problem which i have tried to work on it in every way and even done what you said but nothing seems working out but failed am seriously stuck and pondering on what next?