Skip to content

Instantly share code, notes, and snippets.

@grawk
Last active October 14, 2016 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grawk/472af8b97e1aa156947d0f109045d1fc to your computer and use it in GitHub Desktop.
Save grawk/472af8b97e1aa156947d0f109045d1fc to your computer and use it in GitHub Desktop.
sample nemo-view/mocha setup routine
'use strict';
var Nemo = require('nemo');
module.exports.nemoSetup = function (before, after, addUserFlag) {
before(function (done) {
this.nemo = Nemo(function (err) {
if (err) {
done(err);
return;
}
//SETUP some shared view locators
nemo.view.addView({
"name": "login",
"locator": "path:node_modules/loggedOut/login"
});
done();
});
});
after(function (done) {
this.nemo.driver.quit().then(function () {
done();
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment