wookiehangover/grunt-mocha-appium — pull request #4 by shlomitc (2014-11-04 15:02:45+00:00)
Title: 1. Attach 'wd' and additional data to Mocha framework. 2. Fix promise Chanining

1. Basically, I added the following to `moch-runner.js`:
```
mocha.suite.on('pre-require', function (context, file, m) {
this.ctx.browser = browser;
this.ctx.wd = wd;
this.ctx.additionalMochaData = additionalMochaData;
});
```

additionalMochaData can be passed in grunt options.

2. I fixed a syntax error and allowed chaining (e.g. browser.elementById('someId').tap().sleep(1000)).
Fixed in `mocha-appium.js`
```
var remote;
if(options.usePromises){
remote = options.useBrowserChainWrapper ? 'promiseChainRemote' : 'promiseRemote';
}
else{
remote = options.useBrowserChainWrapper ? 'asyncRemote' : 'remote';
}
```