Fix broken tests cause by API change of Mocha