title: How to run 'After' code on Mocha only on specific tests?
body: <p>Edit: This question was answered, but I have another, similar question which I didn't want to open a new thread for.</p>
  
  <p>I'm using Mocha and Chai to test my project.</p>
  
  <p>As part of my code, I create a new user and save him in our DB (so the test user can perform various methods on our app).</p>
  
  <p>Generally, after every test I would like to run a code block that deletes the user from the DB, which I did using the "AfterEach" hook.</p>
  
  <p>My problem is that I have 1 test (might be more in the future) which doesn't create a user (e.g, 'try to login without signing up'), so my AfterEach code receives an error (can't delete something that doesn't exist).</p>
  
  <p>Does Mocha supply a way to disable the 'AfterEach' on some tests? Or some other solution to my problem.</p>
  
  <p>Edit: Added question: my AfterEach hook involves an async method which returns a promise. On the Mocha documentation I only saw an example for async hooks that work with callbacks. How am I supposed to use an afterEach hook that returns a promise</p>