Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erickzhao/expect-webdriverio-async-test
testing expect-webdriverio matchers with TypeScript
https://github.com/erickzhao/expect-webdriverio-async-test
Last synced: about 1 month ago
JSON representation
testing expect-webdriverio matchers with TypeScript
- Host: GitHub
- URL: https://github.com/erickzhao/expect-webdriverio-async-test
- Owner: erickzhao
- Created: 2023-05-08T19:04:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-09T18:11:12.000Z (over 1 year ago)
- Last Synced: 2024-05-27T21:00:00.766Z (6 months ago)
- Language: TypeScript
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# expect-webdriverio-async-test
This repo demonstrates the need for [webdriverio/expect-webdriverio#962](https://github.com/webdriverio/expect-webdriverio/pull/962) for
the latest version of WebDriver.IO 7.## Repro environment
This repository was bootstrapped using `@wdio/cli` with TypeScript enabled and with the default sample tests.
A few dependencies were changed manually to resolve all necessary peer dependencies.This was tested on VSCode 1.78.0 and macOS Ventura 13.3.1, with the following npm dependencies:
* `[email protected]` (via `@wdio/[email protected]`)
* Node.js v16.14.2
* `[email protected]`
* `[email protected]`## Issue
### Actual behaviour
When viewing `example.e2e.ts` in VSCode, lines 9-10 have the following error hint:
```
'await' has no effect on the type of this expression.ts(80007)
```### Expected behaviour
In `example.e2e.ts`, matchers from `expect-webdriverio` should be asynchronous and `ts(80007)` should
not occur.## Testing the fix
The code change from [webdriverio/expect-webdriverio#962](https://github.com/webdriverio/expect-webdriverio/pull/962)
can be easily applied with `patch-package`. To apply the new types in VSCode:1. Run the `fixme` script via `yarn fixme` to modify your `node_modules` code.
1. Reload your workspace with the `Developer: Reload Window` command in the VSCode command palette.
This command will restart your editor's TypeScript language service.