@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 +4 -0
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.d.ts.map +1 -1
- package/src/index.js +1 -0
- package/src/lib/react-mocks.d.ts +20 -0
- package/src/lib/react-mocks.d.ts.map +1 -0
- package/src/lib/react-mocks.js +30 -0
package/README.md
CHANGED
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
package/src/index.d.ts.map
CHANGED
|
@@ -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
|
+
};
|