Open gavvvr opened 2 days ago
Do you have a tsconfig.json in the root of the test folder after installation? If not, create it and copy this config.
{
"compilerOptions": {
"types": ["@wdio/globals/types", "wdio-electron-service", "mocha"]
},
"include": ["**/*.ts"]
}
I remember this being somewhere in the examples, but I have no idea why cli does not provide it by default
Hi @SaidbekAbdiganiev
The wdio starter CLI includes correct (I believe) tsconfig.json
and it includes the following:
"types": [
"node",
"@wdio/globals/types",
"expect-webdriverio",
"@wdio/mocha-framework"
],
Unfortunately, tsc reports errors since v7.0.4
Steps to reproduce
docker run --rm -it --entrypoint=sh node:22-alpine
npm init wdio@latest electron-e2e-ts
, choose Electron app testing + TypeScripttypescript
to gettsc
command:cd electron-e2e-ts/ && npm i -D typescript
test/specs/test.e2e.ts
to add something likeawait $('aria/Submit').click()
(some text editor might be needed in Docker, for example:apk add --no-cache vim
)npx tsc
) you'll see:Initially I noticed the problem in VSCode:
Roll back to v7.0.2 fixes the problem:
npm uninstall wdio-electron-service && npm i -D wdio-electron-service@7.0.2
. Nownpx tsc
and VSCode are happy.