expect-webdriverio 4.1.3 → 4.2.0
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/jest.d.ts +1 -1
- package/package.json +27 -21
- package/types/expect-webdriverio.d.ts +2 -2
- package/types/standalone.d.ts +8 -4
package/jest.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expect-webdriverio",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
|
|
5
5
|
"description": "WebdriverIO Assertion Library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"./lib/index.js"
|
|
30
30
|
],
|
|
31
|
+
"./jest": [
|
|
32
|
+
{
|
|
33
|
+
"types": "./jest.d.ts"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
31
36
|
"./types": "./types/jest-global.d.ts"
|
|
32
37
|
},
|
|
33
38
|
"types": "./types/jest-global.d.ts",
|
|
@@ -45,39 +50,40 @@
|
|
|
45
50
|
"test:lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
46
51
|
"test:unit": "vitest",
|
|
47
52
|
"test:types": "node test-types/copy && npm run ts && npm run clean:tests",
|
|
48
|
-
"ts": "run-
|
|
49
|
-
"ts:default": "cd test-types/default && tsc --incremental",
|
|
50
|
-
"ts:jest": "cd test-types/jest && tsc --incremental",
|
|
51
|
-
"ts:jasmine": "cd test-types/jasmine && tsc --incremental",
|
|
53
|
+
"ts": "run-s ts:*",
|
|
54
|
+
"ts:default": "cd test-types/default && tsc -p ./tsconfig.json --incremental",
|
|
55
|
+
"ts:jest": "cd test-types/jest && tsc -p ./tsconfig.json --incremental",
|
|
56
|
+
"ts:jasmine": "cd test-types/jasmine && tsc -p ./tsconfig.json --incremental",
|
|
52
57
|
"watch": "npm run compile -- --watch",
|
|
53
58
|
"prepare": "husky install"
|
|
54
59
|
},
|
|
55
60
|
"devDependencies": {
|
|
56
|
-
"@types/
|
|
57
|
-
"@types/
|
|
58
|
-
"@
|
|
59
|
-
"@typescript-eslint/
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"
|
|
63
|
-
"
|
|
61
|
+
"@types/debug": "^4.1.7",
|
|
62
|
+
"@types/jest": "^29.5.1",
|
|
63
|
+
"@types/node": "^18.16.3",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^5.59.1",
|
|
65
|
+
"@typescript-eslint/parser": "^5.59.1",
|
|
66
|
+
"@vitest/coverage-c8": "^0.30.1",
|
|
67
|
+
"@wdio/globals": "^8.8.8",
|
|
68
|
+
"c8": "^7.13.0",
|
|
69
|
+
"eslint": "^8.39.0",
|
|
64
70
|
"eslint-plugin-import": "^2.27.5",
|
|
65
71
|
"eslint-plugin-unicorn": "^46.0.0",
|
|
66
72
|
"husky": "^8.0.3",
|
|
67
73
|
"npm-run-all": "^4.1.5",
|
|
68
|
-
"release-it": "^15.
|
|
74
|
+
"release-it": "^15.10.2",
|
|
69
75
|
"rimraf": "^3.0.2",
|
|
70
76
|
"shelljs": "^0.8.5",
|
|
71
|
-
"typescript": "^
|
|
72
|
-
"vitest": "0.30.
|
|
73
|
-
"webdriverio": "^8.
|
|
77
|
+
"typescript": "^5.0.4",
|
|
78
|
+
"vitest": "0.30.1",
|
|
79
|
+
"webdriverio": "^8.8.8"
|
|
74
80
|
},
|
|
75
81
|
"optionalDependencies": {
|
|
76
|
-
"@wdio/globals": "^8.
|
|
77
|
-
"webdriverio": "^8.
|
|
82
|
+
"@wdio/globals": "^8.8.8",
|
|
83
|
+
"webdriverio": "^8.8.8"
|
|
78
84
|
},
|
|
79
85
|
"dependencies": {
|
|
80
|
-
"expect": "^29.
|
|
81
|
-
"jest-matcher-utils": "^29.
|
|
86
|
+
"expect": "^29.5.0",
|
|
87
|
+
"jest-matcher-utils": "^29.5.0"
|
|
82
88
|
}
|
|
83
89
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare namespace ExpectWebdriverIO {
|
|
2
|
-
function expect<T
|
|
2
|
+
function expect<T extends Promise<void>>(actual: T): Matchers<T, T>
|
|
3
3
|
function setOptions(options: DefaultOptions): void
|
|
4
4
|
|
|
5
5
|
interface DefaultOptions {
|
|
@@ -324,5 +324,5 @@ declare namespace ExpectWebdriverIO {
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
declare module 'expect-webdriverio' {
|
|
327
|
-
export
|
|
327
|
+
export default ExpectWebdriverIO
|
|
328
328
|
}
|
package/types/standalone.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
/// <reference types="./expect-webdriverio.js"/>
|
|
2
2
|
|
|
3
|
+
type ChainablePromiseElement = import('webdriverio').ChainablePromiseElement<WebdriverIO.Element>
|
|
4
|
+
type ChainablePromiseArray = import('webdriverio').ChainablePromiseArray<WebdriverIO.Element>
|
|
5
|
+
type ExpectType = WebdriverIO.Element | Promise<WebdriverIO.Element> | ChainablePromiseElement | ChainablePromiseArray
|
|
6
|
+
|
|
3
7
|
declare namespace ExpectWebdriverIO {
|
|
4
|
-
interface Matchers<R
|
|
8
|
+
interface Matchers<R extends Promise<void>, T> extends Readonly<import('expect').Matchers<R>> {
|
|
5
9
|
not: Matchers<R, T>
|
|
6
|
-
resolves: Matchers<
|
|
7
|
-
rejects: Matchers<
|
|
10
|
+
resolves: Matchers<R, T>
|
|
11
|
+
rejects: Matchers<R, T>
|
|
8
12
|
}
|
|
9
13
|
|
|
10
14
|
type Expect = {
|
|
11
|
-
<T
|
|
15
|
+
<T extends ExpectType, R extends Promise<void>>(actual: T): Matchers<R, T>
|
|
12
16
|
extend(map: Record<string, Function>): void
|
|
13
17
|
} & AsymmetricMatchers
|
|
14
18
|
|