fix mocha tests
Merge pull request #2147 from matiu/bug/mocha-tests

fix mocha tests