webdriverio/tests/typings
Christian Bromann 6464dc7d4a
fix(@wdio/jasmine-framework): become independant from expect-webdriverio (#14592)
* fix(@wdio/jasmine-framework): become independant from expect-webdriverio

* remove console.log

* get tests to work

* fix(ci): add eslint as dep

* fix tests

* run unit tests on Node.js 20, 22 and 24

* move @sveltejs/vite-plugin-svelte to browser runner

* remove usage of Node.js primitives in webdriver and webdriverio

* fix unit tests

* skip svelte test for now

* increase timeouts

* fix component test

* increase timeouts

* increase timeouts

* increase timeouts

* fix imageSize call
2025-07-08 12:51:42 -07:00
..
cucumber fix(typings): fix typing tests using deprecated 'toHaveTextContaining' matcher 2024-07-18 17:22:09 -07:00
jasmine fix(@wdio/jasmine-framework): become independant from expect-webdriverio (#14592) 2025-07-08 12:51:42 -07:00
mocha fix(typings): fix typing tests using deprecated 'toHaveTextContaining' matcher 2024-07-18 17:22:09 -07:00
webdriver (@wdio/lighthouse-service): migrate over from devtools service (#12300) 2024-06-19 23:32:01 -07:00
webdriverio Add support for Sauce Connect 5, drop support for Sauce Connect 4 (#14130) 2025-02-06 11:13:42 -08:00
.gitignore run tests for typescript 3.7 (#6222) 2020-12-11 16:50:00 +01:00
README.md breaking(build): migrate to Esbuild for bundling (#13338) 2024-08-08 23:47:30 -07:00
setup.js (@wdio/lighthouse-service): migrate over from devtools service (#12300) 2024-06-19 23:32:01 -07:00

Typings Validation

Typings validations is used to ensure that typings files are not broken. TypeScript compilation is used to do this kind of static analysis.

Tp run this validation, run the following command from the project root:

$ pnpm run test:typings

Structure

  • sync and webdriverio folders are TypeScript projects
  • project/ tsconfig.json - TypeScript configuration file
  • project/ sync.ts and async.ts - TypeScript files with usage of static and generated typings

What errors can be caught?

  • typings file is missing
  • typings file is broken (ex: syntax error)
  • invalid types for particular types (*), ex: browser.execute, $('').click and others defined by user.

(*) An approach followed to choose methods:

  • check typings in both webdriverio and sync projects
  • at least one type from each typings file
  • at least one type from template file
  • at least one type from specific-types.json file
  • at least some generic types like <T>(...) => T
  • check important chainable functions like $('foo').$('bar')