UNPKG

wdio-mocha-framework

Version:

A WebdriverIO plugin. Adapter for Mocha testing framework.

34 lines (28 loc) 1.05 kB
global.mochaExtra = {} describe('dummy test', () => { it.skip('sample test pending', () => { const start = new Date().getTime() browser.pause() global.mochaExtra.itskip = new Date().getTime() - start }) it.only('should only run this', () => { // eslint-disable-line mocha/no-exclusive-tests const start = new Date().getTime() browser.pause() global.mochaExtra.itonly = new Date().getTime() - start }) it.only('should skip within spec', function () { // eslint-disable-line mocha/no-exclusive-tests this.skip() throw new Error('ignore me') }) it.only('should skip within async spec', function async () { // eslint-disable-line mocha/no-exclusive-tests return browser.command().then(() => { this.skip() throw new Error('ignore me') }) }) it('should not run this', () => { const start = new Date().getTime() browser.pause() global.mochaExtra.it = new Date().getTime() - start }) })