TypeScript Setup
You can write tests using TypeScript to get auto-completion and type safety.
You will need typescript
and ts-node
installed as devDependencies
, via:
- npm
- Yarn
- pnpm
$ npm install typescript ts-node --save-dev
$ yarn add typescript ts-node --dev
$ pnpm add typescript ts-node --save-dev
WebdriverIO will automatically detect if these dependencies are installed and will compile your config and tests for you. Ensure to have a tsconfig.json
in the same directory as you WDIO config. If you need to configure how ts-node runs please use the environment variables for ts-node or use wdio config's autoCompileOpts section.