adding missing var declaration for variable  inNext. fixing problems with mocha globals leak errors