beatfactor/nightwatch — pull request #264 by geekdave (2014-09-11 22:44:52+00:00)
Title: Global `before` and `after` functions need context

I needed my `before` and `after` functions to have access to the nightwatch `settings`, so that they could do proper setup/teardown depending on if tests are using a local or remote (SauceLabs) server.

This PR changes the way the functions are called such that the execution context from the runner is used, giving these functions access to `this.settings`.