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.
- package/README.md +1 -1
- package/jasmine-wdio-expect-async.d.ts +22 -0
- package/jasmine.d.ts +23 -2
- package/jest.d.ts +34 -2
- package/lib/matchers/element/toHaveClass.js +2 -2
- package/lib/snapshot.js +35 -49
- package/lib/softAssert.js +4 -4
- package/lib/softAssertService.js +2 -0
- package/lib/utils.js +5 -5
- package/package.json +28 -18
- package/types/expect-global.d.ts +15 -0
- package/types/expect-webdriverio.d.ts +531 -341
- package/types/jest-global.d.ts +0 -10
- package/types/standalone.d.ts +0 -34
package/types/jest-global.d.ts
DELETED
package/types/standalone.d.ts
DELETED
|
@@ -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
|
-
}
|