webdriverio-boneyard/wdio-mocha-framework

wdio doesn't run the mocha root suite hooks

graingert opened this issue · 2 comments

See this example project:

https://github.com/graingert/wdio-mocha-root-suite-hook

hooks defined putside of any define in any spec file should be run before anything else:

before(function () {
  global.didRunBeforeHook = true;
});
var expect = require('chai').expect;

describe('test suite', function() {
  it('test case', function (){
    expect(global.didRunBeforeHook).to.be.true
  });
});

@christian-bromann these tests used to pass in webdriverio@3

Well something like this is not really working in v4 either giving the fact that wdio creates a new session for each spec file. Sorry