expect-webdriverio 5.5.0 → 5.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +0,0 @@
1
- /// <reference types="./standalone.js"/>
2
-
3
- // @ts-expect-error
4
- declare const expect: ExpectWebdriverIO.Expect
5
-
6
- declare namespace NodeJS {
7
- interface Global {
8
- expect: ExpectWebdriverIO.Expect;
9
- }
10
- }
@@ -1,34 +0,0 @@
1
- /* eslint-disable @typescript-eslint/consistent-type-imports*/
2
- /// <reference types="./expect-webdriverio.js"/>
3
-
4
- type ChainablePromiseElement = import('webdriverio').ChainablePromiseElement
5
- type ChainablePromiseArray = import('webdriverio').ChainablePromiseArray
6
-
7
- declare namespace ExpectWebdriverIO {
8
- interface Matchers<R extends void | Promise<void>, T> extends Readonly<import('expect').Matchers<R>> {
9
- not: Matchers<R, T>
10
- resolves: Matchers<R, T>
11
- rejects: Matchers<R, T>
12
- }
13
-
14
- /**
15
- * expect function declaration, containing two generics:
16
- * - T: the type of the actual value, e.g. WebdriverIO.Browser or WebdriverIO.Element
17
- * - R: the type of the return value, e.g. Promise<void> or void
18
- */
19
- type Expect = {
20
- <T = unknown, R extends void | Promise<void> = void | Promise<void>>(actual: T): Matchers<R, T>
21
- extend(map: Record<string, Function>): void
22
- } & AsymmetricMatchers
23
-
24
- interface AsymmetricMatchers {
25
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
- any(expectedObject: any): PartialMatcher
27
- anything(): PartialMatcher
28
- arrayContaining(sample: Array<unknown>): PartialMatcher
29
- objectContaining(sample: Record<string, unknown>): PartialMatcher
30
- stringContaining(expected: string): PartialMatcher
31
- stringMatching(expected: string | RegExp | ExpectWebdriverIO.PartialMatcher): PartialMatcher
32
- not: AsymmetricMatchers
33
- }
34
- }