I am using Electron to write a desktop application. I want to use Spectron and Mocha because they seem to be the biggest and most supported things out there for testing electron. I am in Windows 10.
using the boiler plate project here :
https://github.com/florin05/electron-spectron-example
The testbed works using 'npm install' then 'npm test'.
then I cleared out the node_modules folder and did it again, after I only changed electron and spectron to their newest versions. Spectron to 12.0.0 and electron to 10.0.0(per spectron's minor version matching requirement).
Now the test bed gives me the following error
1) Sample Test
"before each" hook for "opens a window":
javascript error: javascript error: Cannot convert undefined or null to object
(Session info: chrome=85.0.4183.84)
at Object.getErrorFromResponseBody (node_modules\webdriver\build\utils.js:94:12)
at WebDriverRequest._request (node_modules\webdriver\build\request.js:133:31)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Browser.wrapCommandFn (node_modules\@wdio\utils\build\shim.js:58:29)
at async Browser.wrapCommandFn (node_modules\@wdio\utils\build\shim.js:58:29)
at async Object.startApp (test\hooks.js:13:17)
at async Context.<anonymous> (test\search.js:9:11)
This seems like the simplest possible test of electron and I cannot figure out what I am doing incorrectly. Are there any Electron testing experts out there that would like to tell me why this does not work? I am fairly new to Node and web dev, perhaps I've overlooked something implicit.