spectron
spectron copied to clipboard
Error: Timeout of 10000ms exceeded.
Hi Team,
I am trying to run the scripts which refer the readme by slightly modified:
const assert = require('assert');
const path = require('path');
const Application = require('spectron').Application;
describe('Application launch', function () {
this.timeout(10000)
beforeEach(function () {
this.app = new Application({
path: '/home/ubuntu/jitsi/jitsi-meet-electron-master/dist/jitsi-meet-x86_64.AppImage',
args: ['--no-sandbox']
})
return this.app.start()
})
afterEach(function () {
if (this.app && this.app.isRunning()) {
return this.app.stop()
}
})
it('shows an initial window', function () {
return this.app.client.getWindowCount().then(function (count) {
assert.equal(count, 1)
})
})
})
I got the error as below:
root@test:/home/ubuntu/jitsi/jitsi-meet-electron-master# npm test
> [email protected] test /home/ubuntu/jitsi/jitsi-meet-electron-master
> mocha
Application launch
1) "before each" hook for "shows an initial window"
0 passing (10s)
1 failing
1) Application launch
"before each" hook for "shows an initial window":
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/ubuntu/jitsi/jitsi-meet-electron-master/test/spec.js)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
npm ERR! Test failed. See above for more details.
I'm on Ubuntu 18.04 with
- [email protected]
- [email protected]
- [email protected]
- node v12.19.0
- npm 6.14.8
I am encountering the same problem, but on macOS.
I have the same problem. Solved it on MacOS with:
this.app = new Application({
path: electronPath,
args: ['.'],
startTimeout: 10000,
waitTimeout: 10000,
chromeDriverLogPath: '../chromedriverlog.txt',
chromeDriverArgs: ['remote-debugging-port=9222'],
});
return this.app.start();
But have not been able to find a solution for windows
google is your friend. search: For async tests and hooks, ensure "done()" is called