-
Notifications
You must be signed in to change notification settings - Fork 489
Npm test fails #320
Comments
Same here!
Did a fresh clone.
Console Ouput > mocha temp/e2e.js --require source-map-support/register
application launch
√ shows hello world text on screen after launch
1) "after each" hook: afterEach for "shows hello world text on screen after launch"
1 passing (4s)
1 failing
1) application launch
"after each" hook: afterEach for "shows hello world text on screen after launch":
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Users\patri\Documents\projekte\electron-boilerplate\temp\e2e.js)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7) As we see the error got thrown in the The test itself is alright.
As I struggle myself to get electron-mocha running and just running into different problems across the way, I wanted to join the conversation. |
Spectron defines default timeout for a test of 2000ms, the test setup takes more than that hence the error. I've risen the timeout to 10000ms in the code long time ago: https://github.com/szwacz/electron-boilerplate/blob/master/e2e/utils.js#L5 The code works fine on my MacOS machine, can you test in yours moving the |
The e2e/utils.js already has a timeout of 10 seconds. This is not the solution to the problem. Yes this might only be a windows platform issue. |
Ah, right, I was combating the timeouts in Unfortunately Cypress doesn't have Electron support on their roadmap so far. |
The timeout is specified in
|
FYI, Spectron just announced sun-setting the project: electron-userland/spectron#1045 |
I just cloned this repo and run npm i and npm test. I have not made any changes. The test fails with the following error:
application launch
√ shows hello world text on screen after launch
1) "after each" hook: afterEach for "shows hello world text on screen after launch"
1 passing (4s)
1 failing
"after each" hook: afterEach for "shows hello world text on screen after launch":
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Users----\source\repos\electron-boilerplate\temp\e2e.js)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
The text was updated successfully, but these errors were encountered: