fixing tests when running mocha from cli