babel/generator-babel-boilerplate

Arrow functions break scope context in mocha testing

Closed this issue · 1 comments

For example:

describe('my webdriverio tests', () =>  {
  this.timeout(99999999);

Breaks.

Yep, arrow functions "inherit" the this and arguments of their containing function. This is documented on the Babel docs and even includes a mention in the FAQ. Just use a normal function.