title: Mocha - Test a module with a modification config file
body: <p>I'm trying to test a module with Mocha and should.
  This modules load a config file on startup, and it affects it behavior. 
  So to fully test my module, I need to modify the configuration file between each test. 
  This could be done by modifying the file via fs.writeFile.
  But the problem is, as the module uses require to load the config (a json file), and the module itself is loaded with require, any modification on the file would be ignored, as described in nodejs doc <a href="https://nodejs.org/api/modules.html#modules_caching" rel="nofollow">here</a>, because node cache files loaded by require.</p>
  
  <p>Does anyone has resolve this kind of issue?</p>