kinny
March 2, 2021, 4:13am
1
Hello,
I am having problems with passing the 2 following test:
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’ve tried numerous attempts at it but to no avail, any help is appreciated.
Your code so far
Combining automated deployment, instant hosting & collaborative editing, Glitch gets you straight to coding so you can build full-stack web apps, fast
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36
.
Challenge: Metric-Imperial Converter
Link to the challenge:
sanity
March 2, 2021, 6:13am
2
There was another topic with similar problem, conclusion from it was that glitch is doing some additional processing of requested url, that’s affecting tests. Take a look:
My projects is working fine with all functional and unit test passing but when I pass the solution link to FCC the below tests fail.
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’
Reason:
The below tests being passed by FCC fail.
async getUserInput => {
try {
const data = await $.get(
getUserInput('url') + '/api/convert?input=1//2gal'
);
assert(data.error === 'invalid number'…
kinny
March 2, 2021, 12:32pm
3
Thank you for the reply, I just imported the project to replit and submitted and it works.
system
Closed
September 1, 2021, 12:32am
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.