超过 Appium + Mocha + WebDriverIO 异步超时
Appium + Mocha + WebDriverIO async timeout exceeded
我正在尝试 运行 使用 Appium 进行一些端到端测试。我有这样的简单测试:
describe('TEST', () => {
it('TOST', () => {
return client
.init()
.click('#loginButton')
})
});
运行 这个应用程序启动得很好,但是 Mocha 给我这个错误:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure
"done()" is called; if returning a Promise, ensure it resolves.
如果我输入与 Node.js 脚本相同的代码(没有 Mocha),一切正常。
看来我需要在 package.json 中手动将超时设置为非常大的值,然后 运行 使用 npm test 进行测试。
"mocha --timeout 50000"
我正在尝试 运行 使用 Appium 进行一些端到端测试。我有这样的简单测试:
describe('TEST', () => {
it('TOST', () => {
return client
.init()
.click('#loginButton')
})
});
运行 这个应用程序启动得很好,但是 Mocha 给我这个错误:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
如果我输入与 Node.js 脚本相同的代码(没有 Mocha),一切正常。
看来我需要在 package.json 中手动将超时设置为非常大的值,然后 运行 使用 npm test 进行测试。
"mocha --timeout 50000"