Tell us what’s happening:
Describe your issue in detail here.
I can’t pass the remaining test!
Your project link(s)
solution: https://replit.com/@zikora101/boilerplate-project-metricimpconverter
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 OPR/97.0.0.0
Challenge: Quality Assurance Projects - Metric-Imperial Converter
Link to the challenge:
It marked all in the shell
But it is showing me this error
Hey @nduzikora , you just need to stop the project before running npm run test
so that the test can be run on the same port number.
That’s all!
Thanks @marcusparsons !
But there’s an error now showing in my console.
The message is telling you the server is already running. You should not need to do anything in the command line on Replit as long as the environment variable is set to run the tests.
You might have to chain on .keepOpen()
after the chai.request()
calls in your tests.
I don’t think your tests match the requirements because you are failing the submission tests and passing your own tests (e.g. the unit case for liters and you have a typo for one of the return strings).
Where please?
I can’t seem to locate it…
Where what? What is “it”?
I have pinpointed out the error and rectified it.
But I can’t seem to pass the last two test.
When I fork the Replit and add the test environment variable NODE_ENV=test
your project passes all the tests.
Where did you add the NODE_ENV=test??
Which file?
You add it as a key/value pair in the Secrets
Sensitive information, such as credentials and API keys, must be kept secure. Keeping this information separate from your code helps to protect it from unauthorized access when you share your code with others.
The raw version would look like this (there is a button for it “Edit raw JSON (advanced)”)
{
"NODE_ENV": "test"
}