add generator support in mocha tests