expect-webdriverio 4.2.3 → 4.2.5
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/lib/index.js +5 -2
- package/package.json +3 -3
- package/types/expect-webdriverio.d.ts +5 -0
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
1. `npm install expect` (**Jasmine** and **Jest** users should skip this step)
|
|
18
18
|
2. `npm install expect-webdriverio`
|
|
19
19
|
|
|
20
|
-
NOTE: [WebdriverIO](https://github.com/webdriverio/webdriverio) `
|
|
20
|
+
NOTE: [WebdriverIO](https://github.com/webdriverio/webdriverio) `v8.0.0` or higher is required!
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { expect as expectLib } from 'expect';
|
|
2
|
-
import
|
|
2
|
+
import wdioMatchers from './matchers.js';
|
|
3
|
+
import * as expectUtils from './utils.js';
|
|
3
4
|
import { DEFAULT_OPTIONS } from './constants.js';
|
|
4
|
-
expectLib.extend({ ...
|
|
5
|
+
expectLib.extend({ ...wdioMatchers });
|
|
5
6
|
export const expect = expectLib;
|
|
7
|
+
export const matchers = wdioMatchers;
|
|
6
8
|
export const getConfig = () => DEFAULT_OPTIONS;
|
|
7
9
|
export const setDefaultOptions = (options = {}) => {
|
|
8
10
|
Object.entries(options).forEach(([key, value]) => {
|
|
@@ -12,3 +14,4 @@ export const setDefaultOptions = (options = {}) => {
|
|
|
12
14
|
});
|
|
13
15
|
};
|
|
14
16
|
export const setOptions = setDefaultOptions;
|
|
17
|
+
export const utils = expectUtils;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expect-webdriverio",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.5",
|
|
4
4
|
"author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
|
|
5
5
|
"description": "WebdriverIO Assertion Library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/debug": "^4.1.7",
|
|
62
62
|
"@types/jest": "^29.5.1",
|
|
63
|
-
"@types/node": "^
|
|
63
|
+
"@types/node": "^20.1.0",
|
|
64
64
|
"@typescript-eslint/eslint-plugin": "^5.59.1",
|
|
65
65
|
"@typescript-eslint/parser": "^5.59.1",
|
|
66
66
|
"@vitest/coverage-c8": "^0.30.1",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"c8": "^7.13.0",
|
|
69
69
|
"eslint": "^8.39.0",
|
|
70
70
|
"eslint-plugin-import": "^2.27.5",
|
|
71
|
-
"eslint-plugin-unicorn": "^
|
|
71
|
+
"eslint-plugin-unicorn": "^47.0.0",
|
|
72
72
|
"husky": "^8.0.3",
|
|
73
73
|
"npm-run-all": "^4.1.5",
|
|
74
74
|
"release-it": "^15.10.2",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
declare namespace ExpectWebdriverIO {
|
|
2
2
|
function expect<T = unknown, R extends void | Promise<void> = void | Promise<void>>(actual: T): Matchers<R, T>
|
|
3
3
|
function setOptions(options: DefaultOptions): void
|
|
4
|
+
type matchers = Record<string, ((actual: any, ...expected: any[]) => Promise<{
|
|
5
|
+
pass: boolean;
|
|
6
|
+
message(): string;
|
|
7
|
+
}>)>
|
|
8
|
+
type getConfig = () => any
|
|
4
9
|
|
|
5
10
|
interface DefaultOptions {
|
|
6
11
|
/**
|