nightwatch
Version:
Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.
18 lines (12 loc) • 316 B
JavaScript
const EventEmitter = require('events');
class Command extends EventEmitter {
command(callback = function() {}) {
this.client.setLocateStrategy(this.strategy);
process.nextTick(() => {
callback.call(this.api);
this.emit('complete');
});
return this;
}
}
module.exports = Command;