Metric-Imperial Converter last 2 tests

i am getting this when i try to submit

// running tests
All 16 unit tests are complete and passing.
All 5 functional tests are complete and passing.
// tests completed
// console output
[Error: expected { status: 'unavailable' } to be an array]
[Error: expected { status: 'unavailable' } to be an array]

this is the link to my code: https://replit.com/@kwstasmour/boilerplate-project-metricimpconverter#test-runner.js

Did you add the NODE_ENV=test environment variable? On Replit the key is NODE_ENV and test is the value (using the Secrets).

It will most likely crash the server and you have to restart it again. At the bottom of the “Functional Tests” (after the tests but still inside the callback) you can add an after function.

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

When I do that your code passes all the tests.

Should this be added to the boilerplate, so we don’t keep having this problem on replit?

I opened an issue for it.

thank you very much that worked fine