@pega/cosmos-react-test-utils 8.0.0-build.4.3 → 8.0.0-build.5.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.
Files changed (35) hide show
  1. package/lib/index.d.ts +1 -0
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +1 -0
  4. package/lib/index.js.map +1 -1
  5. package/lib/matchers/index.d.ts +3 -0
  6. package/lib/matchers/index.d.ts.map +1 -0
  7. package/lib/matchers/index.js +7 -0
  8. package/lib/matchers/index.js.map +1 -0
  9. package/lib/matchers/to-contain-assertive-log.d.ts +29 -0
  10. package/lib/matchers/to-contain-assertive-log.d.ts.map +1 -0
  11. package/lib/matchers/to-contain-assertive-log.js +18 -0
  12. package/lib/matchers/to-contain-assertive-log.js.map +1 -0
  13. package/lib/mocks/createObjectURL.d.ts +1 -0
  14. package/lib/mocks/createObjectURL.d.ts.map +1 -0
  15. package/lib/mocks/createObjectURL.js +4 -0
  16. package/lib/mocks/createObjectURL.js.map +1 -0
  17. package/lib/mocks/getCurrentPositionMock.d.ts +2 -0
  18. package/lib/mocks/getCurrentPositionMock.d.ts.map +1 -0
  19. package/lib/mocks/getCurrentPositionMock.js +24 -0
  20. package/lib/mocks/getCurrentPositionMock.js.map +1 -0
  21. package/lib/mocks/index.d.ts +4 -0
  22. package/lib/mocks/index.d.ts.map +1 -1
  23. package/lib/mocks/index.js +4 -0
  24. package/lib/mocks/index.js.map +1 -1
  25. package/lib/mocks/mapsAPILoaderMock.d.ts +1 -0
  26. package/lib/mocks/mapsAPILoaderMock.d.ts.map +1 -0
  27. package/lib/mocks/mapsAPILoaderMock.js +10 -0
  28. package/lib/mocks/mapsAPILoaderMock.js.map +1 -0
  29. package/lib/mocks/randomUUID.d.ts +2 -0
  30. package/lib/mocks/randomUUID.d.ts.map +1 -0
  31. package/lib/mocks/randomUUID.js +3 -0
  32. package/lib/mocks/randomUUID.js.map +1 -0
  33. package/lib/mocks/useBreakpointMock.js +2 -3
  34. package/lib/mocks/useBreakpointMock.js.map +1 -1
  35. package/package.json +6 -3
package/lib/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export * from './matchers';
1
2
  export * from './utils';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  // This file is autogenerated. Any changes will be overwritten.
2
+ export * from './matchers';
2
3
  export * from './utils';
3
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,cAAc,SAAS,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport * from './utils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport * from './matchers';\nexport * from './utils';\n"]}
@@ -0,0 +1,3 @@
1
+ import toContainAssertiveLog from './to-contain-assertive-log';
2
+ export { toContainAssertiveLog };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/matchers/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAO/D,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import toContainAssertiveLog from './to-contain-assertive-log';
2
+ expect.extend({
3
+ toContainAssertiveLog
4
+ });
5
+ // eslint-disable-next-line import/prefer-default-export
6
+ export { toContainAssertiveLog };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/matchers/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAE/D,MAAM,CAAC,MAAM,CAAC;IACZ,qBAAqB;CACtB,CAAC,CAAC;AAEH,wDAAwD;AACxD,OAAO,EAAE,qBAAqB,EAAE,CAAC","sourcesContent":["import toContainAssertiveLog from './to-contain-assertive-log';\n\nexpect.extend({\n toContainAssertiveLog\n});\n\n// eslint-disable-next-line import/prefer-default-export\nexport { toContainAssertiveLog };\n"]}
@@ -0,0 +1,29 @@
1
+ declare global {
2
+ namespace jest {
3
+ interface Matchers<R> {
4
+ /**
5
+ * @description
6
+ * This allows you to check if given element of type 'log' does contain assertive text.
7
+ *
8
+ * @example
9
+ * <div
10
+ * role='log'
11
+ * >
12
+ * Invisible content
13
+ * </div>
14
+ *
15
+ * <div data-testid="visible">Visible Example</div>
16
+ *
17
+ * expect(getByRole('log')).toContainAssertiveLog('Value cannot be empty.')
18
+ * expect(getByRole('log')).not.toContainAssertiveLog('Value cannot be empty.')
19
+ */
20
+ toContainAssertiveLog: (expected: string) => R;
21
+ }
22
+ }
23
+ }
24
+ declare function toContainAssertiveLog(this: jest.MatcherContext, actual: HTMLElement[], expected: string): {
25
+ message: () => string;
26
+ pass: boolean;
27
+ };
28
+ export default toContainAssertiveLog;
29
+ //# sourceMappingURL=to-contain-assertive-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-contain-assertive-log.d.ts","sourceRoot":"","sources":["../../src/matchers/to-contain-assertive-log.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,IAAI,CAAC;QACb,UAAU,QAAQ,CAAC,CAAC;YAClB;;;;;;;;;;;;;;;eAeG;YACH,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,CAAC,CAAC;SAChD;KACF;CACF;AAED,iBAAS,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,MAAM;;;EAmBhG;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import chalk from 'chalk';
2
+ function toContainAssertiveLog(actual, expected) {
3
+ const logFound = actual.find(el => {
4
+ return el.getAttribute('aria-live') === 'assertive';
5
+ });
6
+ if (logFound && logFound.textContent && logFound.textContent.includes(expected)) {
7
+ return {
8
+ message: () => `Expected LiveLog to contain an assertive log that matches "${expected}"`,
9
+ pass: true
10
+ };
11
+ }
12
+ return {
13
+ message: () => `Expected substring: ${chalk.green(expected)}\nReceived string: ${chalk.red(logFound && logFound.textContent ? logFound.textContent : 'undefined')}`,
14
+ pass: false
15
+ };
16
+ }
17
+ export default toContainAssertiveLog;
18
+ //# sourceMappingURL=to-contain-assertive-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-contain-assertive-log.js","sourceRoot":"","sources":["../../src/matchers/to-contain-assertive-log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA0B1B,SAAS,qBAAqB,CAA4B,MAAqB,EAAE,QAAgB;IAC/F,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;QAChC,OAAO,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,WAAW,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,IAAI,QAAQ,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChF,OAAO;YACL,OAAO,EAAE,GAAG,EAAE,CAAC,8DAA8D,QAAQ,GAAG;YACxF,IAAI,EAAE,IAAI;SACX,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,GAAG,EAAE,CACZ,uBAAuB,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,sBAAsB,KAAK,CAAC,GAAG,CACzE,QAAQ,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CACtE,EAAE;QACL,IAAI,EAAE,KAAK;KACZ,CAAC;AACJ,CAAC;AAED,eAAe,qBAAqB,CAAC","sourcesContent":["import chalk from 'chalk';\n\ndeclare global {\n namespace jest {\n interface Matchers<R> {\n /**\n * @description\n * This allows you to check if given element of type 'log' does contain assertive text.\n *\n * @example\n * <div\n * role='log'\n * >\n * Invisible content\n * </div>\n *\n * <div data-testid=\"visible\">Visible Example</div>\n *\n * expect(getByRole('log')).toContainAssertiveLog('Value cannot be empty.')\n * expect(getByRole('log')).not.toContainAssertiveLog('Value cannot be empty.')\n */\n toContainAssertiveLog: (expected: string) => R;\n }\n }\n}\n\nfunction toContainAssertiveLog(this: jest.MatcherContext, actual: HTMLElement[], expected: string) {\n const logFound = actual.find(el => {\n return el.getAttribute('aria-live') === 'assertive';\n });\n\n if (logFound && logFound.textContent && logFound.textContent.includes(expected)) {\n return {\n message: () => `Expected LiveLog to contain an assertive log that matches \"${expected}\"`,\n pass: true\n };\n }\n\n return {\n message: () =>\n `Expected substring: ${chalk.green(expected)}\\nReceived string: ${chalk.red(\n logFound && logFound.textContent ? logFound.textContent : 'undefined'\n )}`,\n pass: false\n };\n}\n\nexport default toContainAssertiveLog;\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=createObjectURL.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createObjectURL.d.ts","sourceRoot":"","sources":["../../src/mocks/createObjectURL.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ URL.createObjectURL = () => '';
3
+ URL.revokeObjectURL = () => { };
4
+ //# sourceMappingURL=createObjectURL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createObjectURL.js","sourceRoot":"","sources":["../../src/mocks/createObjectURL.ts"],"names":[],"mappings":";AAAA,GAAG,CAAC,eAAe,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC;AAC/B,GAAG,CAAC,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC","sourcesContent":["URL.createObjectURL = () => '';\nURL.revokeObjectURL = () => {};\n"]}
@@ -0,0 +1,2 @@
1
+ declare const getCurrentPositionMock: Geolocation['getCurrentPosition'];
2
+ //# sourceMappingURL=getCurrentPositionMock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCurrentPositionMock.d.ts","sourceRoot":"","sources":["../../src/mocks/getCurrentPositionMock.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,EAAE,WAAW,CAAC,oBAAoB,CAa7D,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ const getCurrentPositionMock = successCallback => {
3
+ successCallback({
4
+ coords: {
5
+ latitude: 0,
6
+ longitude: 0,
7
+ accuracy: 1,
8
+ heading: null,
9
+ altitude: null,
10
+ altitudeAccuracy: null,
11
+ speed: null
12
+ },
13
+ timestamp: Date.now()
14
+ });
15
+ };
16
+ Object.defineProperty(globalThis.navigator, 'geolocation', {
17
+ value: {
18
+ getCurrentPosition: getCurrentPositionMock,
19
+ watchPosition: () => { },
20
+ clearWatch: () => { }
21
+ },
22
+ configurable: true
23
+ });
24
+ //# sourceMappingURL=getCurrentPositionMock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCurrentPositionMock.js","sourceRoot":"","sources":["../../src/mocks/getCurrentPositionMock.ts"],"names":[],"mappings":";AAAA,MAAM,sBAAsB,GAAsC,eAAe,CAAC,EAAE;IAClF,eAAe,CAAC;QACd,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,gBAAgB,EAAE,IAAI;YACtB,KAAK,EAAE,IAAI;SACZ;QACD,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE;IACzD,KAAK,EAAE;QACL,kBAAkB,EAAE,sBAAsB;QAC1C,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;QACvB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;KACrB;IACD,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC","sourcesContent":["const getCurrentPositionMock: Geolocation['getCurrentPosition'] = successCallback => {\n successCallback({\n coords: {\n latitude: 0,\n longitude: 0,\n accuracy: 1,\n heading: null,\n altitude: null,\n altitudeAccuracy: null,\n speed: null\n },\n timestamp: Date.now()\n });\n};\n\nObject.defineProperty(globalThis.navigator, 'geolocation', {\n value: {\n getCurrentPosition: getCurrentPositionMock,\n watchPosition: () => {},\n clearWatch: () => {}\n },\n configurable: true\n});\n"]}
@@ -1,11 +1,15 @@
1
+ import './createObjectURL';
1
2
  import './createRange';
2
3
  import './createUIDMock';
3
4
  import './elementFromPointMock';
5
+ import './getCurrentPositionMock';
4
6
  import './iconMock';
5
7
  import './intersectionObserverMock';
8
+ import './mapsAPILoaderMock';
6
9
  import './matchMediaMock';
7
10
  import './popoverMock';
8
11
  import './qrcodeMock';
12
+ import './randomUUID';
9
13
  import './scrollIntoView';
10
14
  import './svgGetBBox';
11
15
  import './svgGetScreenCTM';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,wBAAwB,CAAC;AAChC,OAAO,YAAY,CAAC;AACpB,OAAO,4BAA4B,CAAC;AACpC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAClC,OAAO,YAAY,CAAC;AACpB,OAAO,4BAA4B,CAAC;AACpC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,qBAAqB,CAAC"}
@@ -1,11 +1,15 @@
1
+ import './createObjectURL';
1
2
  import './createRange';
2
3
  import './createUIDMock';
3
4
  import './elementFromPointMock';
5
+ import './getCurrentPositionMock';
4
6
  import './iconMock';
5
7
  import './intersectionObserverMock';
8
+ import './mapsAPILoaderMock';
6
9
  import './matchMediaMock';
7
10
  import './popoverMock';
8
11
  import './qrcodeMock';
12
+ import './randomUUID';
9
13
  import './scrollIntoView';
10
14
  import './svgGetBBox';
11
15
  import './svgGetScreenCTM';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,wBAAwB,CAAC;AAChC,OAAO,YAAY,CAAC;AACpB,OAAO,4BAA4B,CAAC;AACpC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,qBAAqB,CAAC","sourcesContent":["import './createRange';\nimport './createUIDMock';\nimport './elementFromPointMock';\nimport './iconMock';\nimport './intersectionObserverMock';\nimport './matchMediaMock';\nimport './popoverMock';\nimport './qrcodeMock';\nimport './scrollIntoView';\nimport './svgGetBBox';\nimport './svgGetScreenCTM';\nimport './svgGetSubStringLength';\nimport './resizeObserverMock';\nimport './useBreakpointMock';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAClC,OAAO,YAAY,CAAC;AACpB,OAAO,4BAA4B,CAAC;AACpC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,qBAAqB,CAAC","sourcesContent":["import './createObjectURL';\nimport './createRange';\nimport './createUIDMock';\nimport './elementFromPointMock';\nimport './getCurrentPositionMock';\nimport './iconMock';\nimport './intersectionObserverMock';\nimport './mapsAPILoaderMock';\nimport './matchMediaMock';\nimport './popoverMock';\nimport './qrcodeMock';\nimport './randomUUID';\nimport './scrollIntoView';\nimport './svgGetBBox';\nimport './svgGetScreenCTM';\nimport './svgGetSubStringLength';\nimport './resizeObserverMock';\nimport './useBreakpointMock';\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=mapsAPILoaderMock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsAPILoaderMock.d.ts","sourceRoot":"","sources":["../../src/mocks/mapsAPILoaderMock.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ jest.mock('@googlemaps/js-api-loader', () => ({
3
+ Loader: class LoaderMock {
4
+ // eslint-disable-next-line class-methods-use-this
5
+ async load() {
6
+ return Promise.resolve();
7
+ }
8
+ }
9
+ }));
10
+ //# sourceMappingURL=mapsAPILoaderMock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsAPILoaderMock.js","sourceRoot":"","sources":["../../src/mocks/mapsAPILoaderMock.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5C,MAAM,EAAE,MAAM,UAAU;QACtB,kDAAkD;QAClD,KAAK,CAAC,IAAI;YACR,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;KACF;CACF,CAAC,CAAC,CAAC","sourcesContent":["jest.mock('@googlemaps/js-api-loader', () => ({\n Loader: class LoaderMock {\n // eslint-disable-next-line class-methods-use-this\n async load() {\n return Promise.resolve();\n }\n }\n}));\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=randomUUID.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"randomUUID.d.ts","sourceRoot":"","sources":["../../src/mocks/randomUUID.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ window.crypto.randomUUID = () => randomUUID();
3
+ //# sourceMappingURL=randomUUID.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"randomUUID.js","sourceRoot":"","sources":["../../src/mocks/randomUUID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,CAAC,UAAU,GAAG,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC","sourcesContent":["import { randomUUID } from 'node:crypto';\n\nwindow.crypto.randomUUID = () => randomUUID();\n"]}
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
- jest.mock('@pega/cosmos-react-core/lib/hooks', () => {
2
+ jest.mock('@pega/cosmos-react-core/lib/hooks/useBreakpoint', () => {
3
3
  const { themeDefinition } = jest.requireActual('@pega/cosmos-react-core/lib/theme');
4
4
  return {
5
5
  __esModule: true,
6
- ...jest.requireActual('@pega/cosmos-react-core/lib/hooks'),
7
- useBreakpoint: (bp) => {
6
+ default: (bp) => {
8
7
  return (window.innerWidth / 16 >= Number.parseFloat(themeDefinition.base.breakpoints[bp].$value));
9
8
  }
10
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useBreakpointMock.js","sourceRoot":"","sources":["../../src/mocks/useBreakpointMock.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE;IAClD,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,aAAa,CAE5C,mCAAmC,CAAC,CAAC;IAEvC,OAAO;QACL,UAAU,EAAE,IAAI;QAChB,GAAG,IAAI,CAAC,aAAa,CACnB,mCAAmC,CACpC;QAED,aAAa,EAAE,CAAC,EAAiD,EAAE,EAAE;YACnE,OAAO,CACL,MAAM,CAAC,UAAU,GAAG,EAAE,IAAI,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CACzF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["jest.mock('@pega/cosmos-react-core/lib/hooks', () => {\n const { themeDefinition } = jest.requireActual<\n typeof import('@pega/cosmos-react-core/lib/theme')\n >('@pega/cosmos-react-core/lib/theme');\n\n return {\n __esModule: true,\n ...jest.requireActual<typeof import('@pega/cosmos-react-core/lib/hooks')>(\n '@pega/cosmos-react-core/lib/hooks'\n ),\n\n useBreakpoint: (bp: keyof typeof themeDefinition.base.breakpoints) => {\n return (\n window.innerWidth / 16 >= Number.parseFloat(themeDefinition.base.breakpoints[bp].$value)\n );\n }\n };\n});\n"]}
1
+ {"version":3,"file":"useBreakpointMock.js","sourceRoot":"","sources":["../../src/mocks/useBreakpointMock.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,IAAI,CAAC,iDAAiD,EAAE,GAAG,EAAE;IAChE,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,aAAa,CAE5C,mCAAmC,CAAC,CAAC;IAEvC,OAAO;QACL,UAAU,EAAE,IAAI;QAChB,OAAO,EAAE,CAAC,EAAiD,EAAE,EAAE;YAC7D,OAAO,CACL,MAAM,CAAC,UAAU,GAAG,EAAE,IAAI,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CACzF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["jest.mock('@pega/cosmos-react-core/lib/hooks/useBreakpoint', () => {\n const { themeDefinition } = jest.requireActual<\n typeof import('@pega/cosmos-react-core/lib/theme')\n >('@pega/cosmos-react-core/lib/theme');\n\n return {\n __esModule: true,\n default: (bp: keyof typeof themeDefinition.base.breakpoints) => {\n return (\n window.innerWidth / 16 >= Number.parseFloat(themeDefinition.base.breakpoints[bp].$value)\n );\n }\n };\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-test-utils",
3
- "version": "8.0.0-build.4.3",
3
+ "version": "8.0.0-build.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pegasystems/cosmos-react.git",
@@ -22,16 +22,19 @@
22
22
  "build": "tsc -b tsconfig.build.json"
23
23
  },
24
24
  "dependencies": {
25
- "@pega/cosmos-react-core": "8.0.0-build.4.3",
25
+ "@pega/cosmos-react-core": "8.0.0-build.5.0",
26
26
  "@testing-library/dom": "^8.13.0",
27
27
  "@testing-library/react": "^12.1.3",
28
28
  "@types/jest": "^29.5.1",
29
29
  "@types/react": "^17.0.62",
30
30
  "@types/react-dom": "^17.0.20",
31
+ "chalk": "^2.4.2",
32
+ "jest-styled-components": "^7.1.1",
33
+ "polished": "^4.1.0",
31
34
  "react": "^17.0.0",
32
35
  "react-dom": "^17.0.0"
33
36
  },
34
37
  "devDependencies": {
35
- "typescript": "~5.2.2"
38
+ "typescript": "~5.5.4"
36
39
  }
37
40
  }