@digitaldefiance/express-suite-test-utils 1.0.5 → 1.0.6

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 CHANGED
@@ -70,6 +70,10 @@ MIT
70
70
 
71
71
  ## ChangeLog
72
72
 
73
+ ### v1.0.6
74
+
75
+ - Add react mocks
76
+
73
77
  ### v1.0.5
74
78
 
75
79
  - Add secp256k to BSON mock
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/express-suite-test-utils",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Test utilities for Digital Defiance Express Suite",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export * from './lib/to-throw-type';
2
2
  export * from './lib/console';
3
3
  export * from './lib/localStorage-mock';
4
4
  export * from './lib/bson-mock';
5
+ export * from './lib/react-mocks';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-express-suite-test-utils/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-express-suite-test-utils/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
package/src/index.js CHANGED
@@ -5,3 +5,4 @@ tslib_1.__exportStar(require("./lib/to-throw-type"), exports);
5
5
  tslib_1.__exportStar(require("./lib/console"), exports);
6
6
  tslib_1.__exportStar(require("./lib/localStorage-mock"), exports);
7
7
  tslib_1.__exportStar(require("./lib/bson-mock"), exports);
8
+ tslib_1.__exportStar(require("./lib/react-mocks"), exports);
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Mock utilities for React component testing
3
+ */
4
+ /**
5
+ * Mock timezones for testing
6
+ */
7
+ export declare const mockTimezones: string[];
8
+ /**
9
+ * Get initial timezone mock
10
+ */
11
+ export declare const mockGetInitialTimezone: () => string;
12
+ /**
13
+ * Mock RegisterForm props
14
+ */
15
+ export declare const mockRegisterFormProps: {
16
+ timezones: string[];
17
+ getInitialTimezone: () => string;
18
+ onSubmit: jest.Mock<any, any, any>;
19
+ };
20
+ //# sourceMappingURL=react-mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-mocks.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-test-utils/src/lib/react-mocks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,UAOzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAO,MAAe,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,qBAAqB;;8BALQ,MAAM;;CAS/C,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * Mock utilities for React component testing
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.mockRegisterFormProps = exports.mockGetInitialTimezone = exports.mockTimezones = void 0;
7
+ /**
8
+ * Mock timezones for testing
9
+ */
10
+ exports.mockTimezones = [
11
+ 'America/New_York',
12
+ 'America/Los_Angeles',
13
+ 'Europe/London',
14
+ 'Europe/Paris',
15
+ 'Asia/Tokyo',
16
+ 'UTC',
17
+ ];
18
+ /**
19
+ * Get initial timezone mock
20
+ */
21
+ const mockGetInitialTimezone = () => 'UTC';
22
+ exports.mockGetInitialTimezone = mockGetInitialTimezone;
23
+ /**
24
+ * Mock RegisterForm props
25
+ */
26
+ exports.mockRegisterFormProps = {
27
+ timezones: exports.mockTimezones,
28
+ getInitialTimezone: exports.mockGetInitialTimezone,
29
+ onSubmit: jest.fn().mockResolvedValue({ success: true, message: 'Success' }),
30
+ };