title: How to increase the code coverage of express based node.js application?
body: <p>I am working on writing unit test cases for REST APIs developed using node.js. I am using tape for writing unit tests. I came across istanbul npm which can actually tracks the lines of code and branches  tested by Unit tests and generates a nice report at the end of it which can be published( nowhere to hide :) ). </p>
  
  <p>The istanbul report clearly reflects that error conditions(branches) that i put for handling errors particularly of database in node.js code are not getting hit at the time of execution of unit test cases. </p>
  
  <p>Since the APIs are hosted on express, i am not sure that how can i "generate" database related errors (like connection refused) once the server is up so that i can improve upon the "code-coverage" while execution of unit tests.</p>