Strapi Unit Testing - strapi is not defined

I had the same problem. And I found out by looking at the GitHub core repo. That we should use :

//close server to release the db-file
  await strapi.server.close();

instead:

//close server to release the db-file
  await strapi.destroy();
2 Likes