Tell us what’s happening:
My metric ↔ imperial converter is passing all tests except for those which check for my tests.
All 16 unit tests are complete and passing. (Test timed out)
All 5 functional tests are complete and passing. (Test timed out)
I noticed in the developer console that it might be CORS related:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://calm-sea-41276.herokuapp.com/_api/get-tests. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
However, I thought that the files from the FCC Github boilerplate repo would handle the CORS for me (as it’s installed the npm package cors
and in server.js
I see the line app.use(cors({origin: '*'})); //For FCC testing purposes only
).
Another thread suggested installing a browser plugin to add said Access-Control-Allow-Origin headers, however, then Heroku logs give a timeout application error (code H12), even though the console error about CORS is gone.
I tried adding comments to the fcctesting.js
file to figure out how far it goes without a problem (not that I understand most of the code there, but thought it might possibly be helpful?)
And I triple-checked that the NODE_ENV
variable had been set on Heroku as well.
Your project link(s)
solution: https://calm-sea-41276.herokuapp.com
githubLink: https://github.com/deina-k/boilerplate-project-metricimpconverter
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0
Challenge: Metric-Imperial Converter
Link to the challenge: