title: Node Testing: how to run bash commands after mocha test cases
body: <p>I'm using <code>Mocha</code> and <code>Selenium</code> to do an e2e test for my node web app. Now the problem is, I want to tear down databases after the execution of all test cases.</p>
  
  <p>Backend uses two databases - mongo and postgres. I created new empty testing databases of each, just for the e2e testing. During the testing some records are inserted into databases. So, at the end of testing (when mocha test cases which invoke selenium are all executed), I want to tear down the test databases and create new ones. These operations are apparently done by bash commands.</p>
  
  <p>So, is this a good practice and if so, how can I achieve this, like writing bash commands in js file(which execute the mocha test cases)?</p>