@wdio/globals 8.0.0-alpha.412 → 8.0.0-alpha.505

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/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference types="./standalone" />
1
+ /// <reference types="expect-webdriverio/types/standalone" />
2
2
  /// <reference types="types" />
3
3
  declare type SupportedGlobals = 'browser' | 'driver' | 'multiremotebrowser' | '$' | '$$' | 'expect';
4
4
  export declare const browser: WebdriverIO.Browser;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA,aAAK,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,oBAAoB,GAAG,GAAG,GAAG,IAAI,GAAG,QAAQ,CAAA;AAiB3F,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,OAGjC,CAAA;AACD,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,OAGhC,CAAA;AACD,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,kBAG5C,CAAA;AACD,eAAO,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,CAKtC,CAAA;AACD,eAAO,MAAM,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAKxC,CAAA;AACD,eAAO,MAAM,MAAM,EAAE,iBAAiB,CAAC,MAKT,CAAA;AAE9B;;;;;GAKG;AACH,wBAAgB,UAAU,CAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,UAAO,QAO9E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA,aAAK,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,oBAAoB,GAAG,GAAG,GAAG,IAAI,GAAG,QAAQ,CAAA;AAiB3F,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,OAGjC,CAAA;AACD,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,OAGhC,CAAA;AACD,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,kBAG5C,CAAA;AACD,eAAO,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,CAKtC,CAAA;AACD,eAAO,MAAM,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAKxC,CAAA;AACD,eAAO,MAAM,MAAM,EAAE,iBAAiB,CAAC,MAKT,CAAA;AAU9B;;;;;GAKG;AACH,wBAAgB,UAAU,CAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,UAAO,QAO9E"}
package/build/index.js CHANGED
@@ -35,6 +35,13 @@ export const expect = ((...args) => {
35
35
  }
36
36
  return globals.get('expect')(...args);
37
37
  });
38
+ expect.extend = (...args) => {
39
+ if (!globals.has('expect')) {
40
+ throw new Error(GLOBALS_ERROR_MESSAGE);
41
+ }
42
+ const expect = globals.get('expect');
43
+ return expect.extend(...args);
44
+ };
38
45
  /**
39
46
  * allows to set global property to be imported and used later on
40
47
  * @param key global key
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/globals",
3
- "version": "8.0.0-alpha.412+a2bc7ec67",
3
+ "version": "8.0.0-alpha.505+c16286903",
4
4
  "description": "A helper utility for importing global variables directly",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-globals",
@@ -28,9 +28,17 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "dependencies": {
31
+ "peerDependencies": {
32
32
  "expect-webdriverio": "^4.0.0-alpha.3",
33
- "webdriverio": "8.0.0-alpha.412+a2bc7ec67"
33
+ "webdriverio": "7.20.7"
34
34
  },
35
- "gitHead": "a2bc7ec67e2a5fe000e539f44b0ea97f6e08ccbd"
35
+ "peerDependenciesMeta": {
36
+ "webdriverio": {
37
+ "optional": true
38
+ },
39
+ "expect-webdriverio": {
40
+ "optional": true
41
+ }
42
+ },
43
+ "gitHead": "c16286903354336371e6ff325fea25dd94d032b8"
36
44
  }