dhre-ui-kit 0.0.24 → 0.0.25

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.
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import {CustomTextProps} from '../src/components/customText/CustomText';
3
+ import CustomTypography from '../src/components/customTypography/CustomTypography';
4
+
5
+ // const mockProps: CustomTextProps = {
6
+ // text: 'string',
7
+ // variant: 'string',
8
+ // };
9
+
10
+ // const CustomText = jest.requireActual(
11
+ // 'dhre-ui-kit/src/components/customText/CustomText.tsx',
12
+ // );
13
+
14
+ export default {
15
+ CustomText: (mockProps: CustomTextProps) => {
16
+ const {text, variant} = mockProps;
17
+ return <CustomTypography variant={variant} text={text || ''} />;
18
+ },
19
+ };
@@ -0,0 +1,21 @@
1
+ jest.mock('rn-tooltip', () => {
2
+ return jest.fn(({children}) => children);
3
+ });
4
+
5
+ jest.mock('react-native-otp-verify', () => ({
6
+ getOtp: jest.fn(),
7
+ getHash: jest.fn(),
8
+ addListener: jest.fn(),
9
+ removeListener: jest.fn(),
10
+ }));
11
+
12
+ jest.mock('react-native-pdf', () => 'Pdf');
13
+
14
+ jest.mock('react-native-webview', () => {
15
+ return jest.fn().mockImplementation(() => {
16
+ return null;
17
+ });
18
+ });
19
+ jest.mock('react-redux', () => ({
20
+ useSelector: jest.fn(),
21
+ }));
@@ -0,0 +1,2 @@
1
+ module.exports = 'SvgMock';
2
+ module.exports.ReactComponent = 'SvgMock';
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "dhre-ui-kit",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "main": "src/index.ts",
5
5
  "files": [
6
6
  "src",
7
- "README.md"
7
+ "README.md",
8
+ "__mocks__"
8
9
  ],
9
10
  "scripts": {
10
11
  "android": "react-native run-android",
package/src/index.ts CHANGED
@@ -41,3 +41,5 @@ export {
41
41
  } from './utils/stylehelper';
42
42
 
43
43
  export {default} from './theme/themes';
44
+
45
+ export {default as CustomTextTest} from '../__mocks__/custom-text.mock';