nightwatchify
nightwatchify
makes your ES6 code executable on nightwatch.js.
Usage
nightwatchify(testcases)
Wrap nightwatch's testcases to ES5 testcase object
const nightwatchify = ; moduleexports = ;
nightwatchify.Command
Wrap nightwatch's Custom Commands to executable by ES6 class.
This is example for Saucelabs update job:
const nightwatchify = ;const Saucelabs = ; // Define as ES6 class { } { thisapi; return this; } moduleexports = nightwatchify;
The wrapped class extends EventEmitter
automatically, so you can use this.emit('complete')
without any extends.
Note: context of command()
method is wrapped class, not SaucelabsReporter
. If you want to access SaucelabsReporter
instance itself, you can access it via this.cmd
property.
nightwatchify.Bdd()
Wrap BDD global functions to ES5
const nightwatchify = ;nightwatchify; ;
Author
Yoshiaki Sugimoto
License
MIT