fix deprecation warning on mocha