Files
inji-wallet/screens/Settings/SettingScreen.test.tsx
KiruthikaJeyashankar 61673d0f66 [INJIMOB-2886] add sonar support for inji-wallet (#1852)
Other changes include:
- add mocks for failing tests

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
2025-03-11 11:34:46 +05:30

47 lines
1.4 KiB
TypeScript

import React from 'react';
import {SettingScreen} from './SettingScreen';
import ShallowRenderer from 'react-test-renderer/shallow';
import mockedConstants from '../../__mocks__/react-native.mock';
describe('testing the settingsScreen component in Android and IOS', () => {
beforeEach(() => {
// Mock Platform module for Android
jest.mock('expo-constants', () => {
mockedConstants.Platform.OS = 'android';
return mockedConstants;
});
});
it.skip('renders the SettingScreen component in android', () => {
// const renderer = new ShallowRenderer();
// const result = renderer.render(
// <SettingScreen
// triggerComponent={undefined}
// navigation={undefined}
// route={undefined}
// />,
// );
// expect(result).toMatchSnapshot();
});
it.skip('renders the SettingScreen component in IOS', () => {
// // Clear the previous mock
// jest.resetModules();
// // Mock Platform module for IOS
// jest.mock('expo-constants', () => {
// mockedConstants.Platform.OS = 'ios';
// return mockedConstants;
// });
//
// const renderer = new ShallowRenderer();
// const result = renderer.render(
// <SettingScreen
// triggerComponent={undefined}
// navigation={undefined}
// route={undefined}
// />,
// );
// expect(result).toMatchSnapshot();
});
});