Search code examples
javascriptmocha.jsappiumwebdriver-ioappium-android

Appium + Mocha + WebDriverIO async timeout exceeded


I'm trying to run some e2e testing using Appium. I have simple test like this:

describe('TEST', () => {
    it('TOST', () => {
        return client
                .init()
                .click('#loginButton')
        })
});

Running this one application is started just fine but the Mocha is giving me this error:

Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

If I put the same code as just Node.js script (without Mocha) everything is working correct.


Solution

  • It seems like I needed to set manually timeout to really big value in my package.json then run tests using npm test.

    "mocha --timeout 50000"