Code coverage report for mongodb-version-manager/lib/cleanup.js

Statements: 25% (2 / 8)      Branches: 100% (0 / 0)      Functions: 0% (0 / 3)      Lines: 25% (2 / 8)      Ignored: none     

All files » mongodb-version-manager/lib/ » cleanup.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 161   1                          
var debug = require('debug')('mvm:cleanup');
 
module.exports = function(msg, fn) {
  var done = function() {
    debug('running uncleared: %s', msg);
    fn();
  };
 
  process.on('exit', done);
  return {
    clear: function() {
      process.removeListener('exit', done);
    }
  };
};