American British Translator submission

Hello,

I am having issues with submitting my American British Translator project.
On my server it passes all 30 tests required (24 unit tests, 6 functional tests).
However when uploading to the below link, it says I didn’t pass the two requirements:
" All 24 unit tests are complete and passing. See /tests/1_unit-tests.js for the expected behavior you should write tests for."
“All 6 functional tests are complete and passing. See /tests/2_functional-tests.js for the functionality you should write tests for.”

Link: Project URL

See these two screenshots if it is still unclear:


I’m not the best at formatting forum text but here goes, see the below two examples from my code to see the structure of how I test (first a unit test then a functional test).

test("Highlight translation in Paracetamol takes up to an hour to work.", function() {
    assert.strictEqual(t.translate("Paracetamol takes up to an hour to work.", true), '<span class="highlight">Tylenol</span> takes up to an hour to work.');
  });

test("Translation with text that needs no translation: POST request to /api/translate", function(done) {
    chai
      .request(server)
      .post("/api/translate")
      .send({
        'text': "Mangoes are my favourite fruit.",
        'locale': "american-to-british"
      })
      .end(function(err, res) {
        assert.strictEqual(res.text, '{"text":"Mangoes are my favourite fruit.","translation":"Everything looks good to me!"}');
        done();
      });
  });

I am also very confused why this is not working, as I basically copied the structure from one of my other projects in the same certificate that has been approved.

I hope one of you will be able to help me as this is the last thing that needs to be corrected before I have finished this certification, so I’m really looking forward to it!

Thank you very much in advance,
Andreas

Okay, it seems I forgot all about repl.it removing access to .env files some time ago.
If anyone reads this and needs help, there is a lock in the left side of repl.it which can be used to add environmental elements. Just add the key NODE_ENV with the value test and it should work.

Should perhaps edit the text in the project text to explain this. (It might say so on earlier projects, but since it’s a few months ago I last did a project on replit, I don’t remember much from earlier projects)