diff --git a/index.js b/index.js index f995da8..e3e9e9c 100644 --- a/index.js +++ b/index.js @@ -203,6 +203,15 @@ class NiffyTestRunner throw new Error(failMessage); } } + + /** + * exposes the nightmare wait fubction + * + * @param {String} target selector of ms + */ + * wait( target ){ + yield this.nightmare.wait( target ); + } } diff --git a/test/index.js b/test/index.js index ce4ec9f..faf022f 100644 --- a/test/index.js +++ b/test/index.js @@ -18,6 +18,11 @@ describe('Google', function () { const { label, width, height } = size; describe(`${label} : ${width} x ${height}`, () => { + + before(function* () {); + yield niffy.wait(100); // example + }); + it('Homepage', function* () { yield niffy.test('/'); })