You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Overrides the default WDIO expect specifically for Jasmine, since `expectAsync` is forced into `expect`, making all matchers fully asynchronous. This is not the case under Jest or Mocha.
30
-
* Using `jasmine.AsyncMatchers` pull on WdioMatchers above but also allow to using Jasmine's built-in matchers and also `withContext` matcher.
37
+
* Using `jasmine.AsyncMatchers` includes the WdioMatchers from above, but also allows using Jasmine's built-in matchers and the `withContext` matcher.
* Augment the Jasmine namespace to include the WDIO custom async matchers only.
5
+
* When using the vanilla Jasmine Library, use `jasmine.addAsyncMatchers(matchers)` and specify `expect-webdriverio/jasmine` in the tsconfig.json's types.
6
+
*/
7
+
3
8
declarenamespacejasmine{
4
9
5
10
/**
6
-
* Async matchers for Jasmine to allow the typing of `expectAsync` with WebDriverIO matchers.
11
+
* Async matchers for Jasmine to allow the typing of `expectAsync` with WebDriverIO custom matchers.
7
12
* T is the type of the actual value
8
13
* U is the type of the expected value
9
14
* Both T,U must stay named as they are to override the default `AsyncMatchers` type from Jasmine.
10
15
*
11
-
* We force Matchers to return a `Promise<void>` since Jasmine's `expectAsync` expects a promise in all cases (different from Jest)
12
-
* With Jasmine, only custom matchers are available under `expectAsync`, and not the one from Jest `expect` Library.
16
+
* We force Matchers to return a `Promise<void>` since under Jasmine's `expectAsync` everything is a promise.
0 commit comments