expect-webdriverio 4.11.3 → 4.11.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/lib/index.js CHANGED
@@ -1,17 +1,9 @@
1
1
  import { expect as expectLib } from 'expect';
2
2
  import wdioMatchers from './matchers.js';
3
3
  import { DEFAULT_OPTIONS } from './constants.js';
4
- export const matchers = new Map();
5
- const extend = expectLib.extend;
6
- expectLib.extend = (m) => {
7
- if (!m || typeof m !== 'object') {
8
- return;
9
- }
10
- Object.entries(m).forEach(([name, matcher]) => matchers.set(name, matcher));
11
- return extend(m);
12
- };
13
- expectLib.extend(wdioMatchers);
4
+ expectLib.extend({ ...wdioMatchers });
14
5
  export const expect = expectLib;
6
+ export const matchers = wdioMatchers;
15
7
  export const getConfig = () => DEFAULT_OPTIONS;
16
8
  export const setDefaultOptions = (options = {}) => {
17
9
  Object.entries(options).forEach(([key, value]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expect-webdriverio",
3
- "version": "4.11.3",
3
+ "version": "4.11.5",
4
4
  "author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
5
5
  "description": "WebdriverIO Assertion Library",
6
6
  "license": "MIT",
@@ -68,7 +68,7 @@
68
68
  "c8": "^9.1.0",
69
69
  "eslint": "^8.56.0",
70
70
  "eslint-plugin-import": "^2.29.1",
71
- "eslint-plugin-unicorn": "^50.0.1",
71
+ "eslint-plugin-unicorn": "^51.0.1",
72
72
  "husky": "^9.0.7",
73
73
  "npm-run-all": "^4.1.5",
74
74
  "release-it": "^17.0.3",
@@ -76,7 +76,7 @@
76
76
  "shelljs": "^0.8.5",
77
77
  "typescript": "^5.3.3",
78
78
  "vitest": "1.2.2",
79
- "webdriverio": "8.29.7"
79
+ "webdriverio": "8.31.1"
80
80
  },
81
81
  "optionalDependencies": {
82
82
  "@wdio/globals": "^8.29.3",
@@ -1,8 +1,5 @@
1
1
  /// <reference types="./standalone.js"/>
2
2
 
3
- // @ts-expect-error
4
- declare const expect: ExpectWebdriverIO.Expect
5
-
6
3
  declare namespace NodeJS {
7
4
  interface Global {
8
5
  expect: ExpectWebdriverIO.Expect;