So numerous times I’ve received the following errors:
listen EADDRINUSE: address already in use :::3000`
and
I’ve been using the same code that Mosh has been using. First come the errors, then strangely enough I haven’t changed anything and now all tests are passing again… Has anyone else experienced this? Because I’ve been going on and off with it. Maybe it’s a bug?
Okay so I found a solution for the first error. Make sure you use await with server.close in every afterEach() function as they do use async to connect the database.