Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/int testing mobile #122

Closed
wants to merge 116 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
e043757
Merge pull request #42 from COS301-SE-2024/v0.0.1
Rethakgetse-Manaka Jun 3, 2024
36f5318
Merge pull request #89 from COS301-SE-2024/v0.1.0
waveyboym Jun 24, 2024
8b2ee5d
chore: Add @babel/plugin-proposal-export-namespace-from plugin to bab…
u21631532 Jun 27, 2024
6f8e914
chore: Add Jest configuration for mobile testing
u21631532 Jun 27, 2024
2d17451
chore: Add Jest setup for mocking react-native-reanimated and react-n…
u21631532 Jun 27, 2024
43e55c6
chore: Update tsconfig.json to include test files for Booking screen
u21631532 Jun 27, 2024
3aa4d1b
chore: Update tsconfig.json to include test files for Booking screen
u21631532 Jun 27, 2024
40056f1
chore: Add integration tests for BookRoom component
u21631532 Jun 27, 2024
0e59e11
chore: Update jest.config.js preset to 'react-native'
u21631532 Jun 27, 2024
3c192d5
chore: Add Jest setup for mocking @expo/vector-icons
u21631532 Jun 27, 2024
600b4fb
chore: Update Jest setup for mocking @expo/vector-icons and add Jest …
u21631532 Jun 27, 2024
1e49dfd
chore: Update Jest setup for mocking
u21631532 Jun 27, 2024
f04a9bd
chore: Update Jest setup for mocking in Int_BookRoom.test.js
u21631532 Jun 27, 2024
ae5c633
chore: Update Jest setup for mocking
u21631532 Jun 27, 2024
46b6cd9
chore: Update Jest setup for mocking react-native-safe-area-context
u21631532 Jun 27, 2024
883f2b0
test: Add SafeAreaProvider to BookRoom test for proper rendering
u21631532 Jun 27, 2024
aa3c43c
chore: Update Jest setup for mocking react-native-safe-area-context a…
u21631532 Jun 27, 2024
d2b8d80
5/6 tests pass
u21631532 Jun 27, 2024
3d55c22
chore: Update Jest setup for mocking react-native-gesture-handler, re…
u21631532 Jun 28, 2024
2edd1a2
chore: Mock GestureHandlerRootView in Jest setup
u21631532 Jun 28, 2024
42121ca
chore: Update Jest setup for mocking @react-navigation/stack
u21631532 Jun 28, 2024
ea3139b
chore: Update Jest setup for mocking @react-navigation/native, react-…
u21631532 Jun 28, 2024
7a839aa
chore: Update Jest setup for mocking react-native and react-native-as…
u21631532 Jun 28, 2024
6c02a89
chore: Update Jest setup for mocking react-native and react-native-as…
u21631532 Jun 28, 2024
389b6e1
chore: Update Jest setup for mocking react-native, react-native-async…
u21631532 Jun 28, 2024
f11858e
chore: Update Jest setup for mocking
u21631532 Jun 28, 2024
43c49bf
chore: Update Jest setup for mocking react-native and react-native-as…
u21631532 Jun 28, 2024
673cae5
chore: Update Jest setup for mocking
u21631532 Jun 28, 2024
a24524c
chore: Update Jest setup for mocking Dimensions in Jest setup
u21631532 Jun 28, 2024
df25f93
chore: Update Jest setup for mocking
u21631532 Jun 28, 2024
56267d0
chore: Refactor Jest setup for mocking Dimensions in Jest setup
u21631532 Jun 29, 2024
eb11f0b
chore: Update Jest setup for mocking react-native Dimensions and util…
u21631532 Jun 29, 2024
bebe076
chore: Update Jest setup for mocking react-native Dimensions, utiliti…
u21631532 Jun 29, 2024
5b723a9
chore: Update the TurboModuleRegistry mock:
u21631532 Jun 29, 2024
1ffba58
This should address the warnings related to NativeEventEmitter and th…
u21631532 Jun 29, 2024
a04d680
chore: Add integration test for onboarding flow
u21631532 Jun 29, 2024
e49c952
chore: Update Jest setup for mocking react-native Dimensions in Jest …
u21631532 Jun 29, 2024
8e29ee1
test: Add integration test for App Navigation Flow
u21631532 Jun 29, 2024
7f5ef42
chore: Remove unused integration test for Onboarding Flow
u21631532 Jun 29, 2024
8218773
update: 8/9 tests pass
u21631532 Jun 29, 2024
3fa4fe0
chore: Update Jest setup to handle image files in tests
u21631532 Jun 29, 2024
84b741e
chore: now handles animated images
u21631532 Jun 29, 2024
064ce68
feat: Update Onboarding1 screen UI and add Capacity Prediction feature
u21631532 Jun 29, 2024
ead678a
chore: Update Onboarding2 screen UI and fix test IDs in Onboarding2 c…
u21631532 Jun 29, 2024
6f56584
chore: Update Onboarding2 screen UI, fix test IDs, and handle animate…
u21631532 Jun 29, 2024
9d5d42e
chore: Update Onboarding3 screen UI, fix test IDs, and handle animate…
u21631532 Jun 29, 2024
b7027eb
chore: Update Welcome screen UI, fix test IDs, and add login button
u21631532 Jun 29, 2024
2e04433
chore: Update App Navigation Flow integration test and fix failing tests
u21631532 Jun 29, 2024
a469a95
chore: Add fileMock.js for testing purposes
u21631532 Jun 29, 2024
580c1da
chore: Update babel.config.js presets and plugins
u21631532 Jun 29, 2024
9fb77c0
chore: Update Jest setup to handle image files in tests
u21631532 Jun 29, 2024
caff735
chore: Add integration tests for App Navigation from Welcome screen
u21631532 Jun 29, 2024
8c5b8d9
3/8 tests passing Phase 2
u21631532 Jun 29, 2024
971b1dd
chore: Add test IDs for new password and confirm password inputs
u21631532 Jun 29, 2024
272a54c
chore: Update SignInForm UI, add test IDs for email and password inputs
u21631532 Jun 29, 2024
4f02e5a
chore: Add test IDs for email, employee, password, and confirm passwo…
u21631532 Jun 29, 2024
6779bcb
chore: Add test ID for OTP input in OtpVerification screen
u21631532 Jun 29, 2024
bceb3b0
chore: Add test ID for email input in ForgotPassword screen
u21631532 Jun 29, 2024
ec881e6
chore: Refactor integration tests for App Navigation from Welcome Page
u21631532 Jun 29, 2024
c89a230
chore: Removed unnecessary changes for integration tests for App Navi…
u21631532 Jun 29, 2024
8c5efc2
To be continued: All tests pass currently but need to work with API c…
u21631532 Jun 29, 2024
7480939
chore:
u21631532 Jun 29, 2024
18b3e11
chore: test passing, awaiting correct API calls
u21631532 Jun 29, 2024
76dbb12
chore: Add mock for expo-vector-icons
u21631532 Jun 29, 2024
e3f212a
chore: Add mock for gluestack-ui-themed.js
u21631532 Jun 29, 2024
c06edac
chore: Update babel.config.js and jest.config.js for better compatibi…
u21631532 Jun 29, 2024
ee330c6
chore: Update mock for gluestack-ui-themed.js
u21631532 Jun 29, 2024
2af9bb0
chore: Add React import to expo-vector-icons mock
u21631532 Jun 29, 2024
4c72625
chore: Update Dashboard integration tests to use react-test-renderer
u21631532 Jun 29, 2024
c92463c
chore: Update Dashboard component to include testID for occupancy data
u21631532 Jun 29, 2024
079290c
chore: Update Dashboard component to include testID for occupancy data
u21631532 Jun 29, 2024
fb357ae
chore: Add types for jest and react-test-renderer in tsconfig.json
u21631532 Jun 29, 2024
f14ec5e
chore: Update jest.config.js to use 'jest-expo' preset and remove unn…
u21631532 Jun 30, 2024
cf05c2b
chore: Update jest.setup.js for better test configuration and mocking
u21631532 Jun 30, 2024
9de31bf
chore: Update expo-vector-icons and gluestack-ui-themed mocks
u21631532 Jun 30, 2024
95ce37a
Test Suites: 1 passed, 1 total
u21631532 Jun 30, 2024
0e62791
chore: Update expo-vector-icons and gluestack-ui-themed mocks
u21631532 Jun 30, 2024
845e98b
chore: Update jest.config.js to include react-native-community/dateti…
u21631532 Jun 30, 2024
27f31c0
feat: Add testID to profile link for navigation
u21631532 Jun 30, 2024
efa2db8
feat: Add testID to profile link for navigation
u21631532 Jun 30, 2024
801c91e
feat: Add testID to profile link for navigation
u21631532 Jun 30, 2024
62dda3f
Test Suites: 1 passed, 1 total
u21631532 Jun 30, 2024
243a3d0
chore: Update ViewBookingDetails component with testIDs for elements
u21631532 Jun 30, 2024
fae1720
chore: Add testIDs to booking details screen elements
u21631532 Jun 30, 2024
5158dc4
chore: Add testID to office data elements in OfficeDetails screen
u21631532 Jun 30, 2024
090aaef
Test Suites: 1 passed, 1 total
u21631532 Jun 30, 2024
e65c95d
chore: Update jest.config.js to include react-native-community/dateti…
u21631532 Jun 30, 2024
77b0075
Test Suites: 1 passed, 1 total
u21631532 Jun 30, 2024
2d9083d
chore: Update npm dependencies and add new packages for clipboard, da…
u21631532 Jun 30, 2024
b1b7b76
Test Suites: 1 passed, 1 total
u21631532 Jun 30, 2024
1115184
chore: Update Welcome screen button props to use onClick instead of o…
u21631532 Jun 30, 2024
d2534c3
chore: Update GradientButton component to include testID prop
u21631532 Jul 1, 2024
799c40c
chore: Update GradientButton component to include testID prop
u21631532 Jul 1, 2024
7cbfe9b
chore: Update GradientButton component to include testID prop
u21631532 Jul 1, 2024
0ca5dc3
chore: 5/8 tests are passing in Phase1
u21631532 Jul 1, 2024
33341ff
Tests: 2 failed, 6 passed, 8 total
u21631532 Jul 1, 2024
b8a35b6
Tests: 1 failed, 7 passed, 8 total
u21631532 Jul 1, 2024
c4d6ed6
Test Suites: 1 passed, 1 total
u21631532 Jul 1, 2024
85eab29
chore: Add imageMock.js for testing purposes
u21631532 Jul 1, 2024
b5da26b
chore: Update jest.config.js to include @ui-kitten in transformIgnore…
u21631532 Jul 1, 2024
0ae80cf
chore: Update ThemedText component snapshot
u21631532 Jul 1, 2024
1100966
chore: Update ThemedText component snapshot
u21631532 Jul 1, 2024
3e7644a
refactor: Update ThemedText component to import React and fix import …
u21631532 Jul 1, 2024
4b593cb
chore: Update jest.config.js to include moduleFileExtensions
u21631532 Jul 1, 2024
72a357a
est Suites: 7 passed, 7 total
u21631532 Jul 1, 2024
30a8cfc
refactor: Update ThemedText component to import React and fix import …
u21631532 Jul 1, 2024
0f7409a
Merge changes into dev
u21631532 Jul 4, 2024
fe9701b
chore: Add testID prop to GradientButton component
u21631532 Jul 4, 2024
f23cab1
chore: Update eslint configuration for Jest environment
u21631532 Jul 4, 2024
7c29d83
refactor: Update import paths for Profile and Settings in Int_User.te…
u21631532 Jul 4, 2024
8fbf3f3
chore: Update import paths for Profile and Settings in Int_User.test.js
u21631532 Jul 9, 2024
8d5974e
chore: Update import paths for Profile and Settings in Int_User.test.js
u21631532 Jul 9, 2024
ae1d5e0
chore: Update Jest configuration and dependencies
u21631532 Jul 10, 2024
ef7725a
Merge branch 'develop' into feat/int-testing-mobile
u21631532 Jul 24, 2024
34f9b01
chore: Update BookRoom function to convert tokens to string array for…
u21631532 Jul 24, 2024
4a6e72c
Merge branch 'develop' into feat/int-testing-mobile
u21631532 Jul 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion frontend/occupi-mobile4/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// https://docs.expo.dev/guides/using-eslint/
// .estlint.js
module.exports = {
extends: 'expo',
};
env: {
jest: true, // Add this line
},
};
9 changes: 9 additions & 0 deletions frontend/occupi-mobile4/__mocks__/expo-vector-icons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// __mocks__/expo-vector-icons.js
const mockIcon = () => 'Icon';
// export const Feather = mockIcon;
export const FontAwesome6 = mockIcon;
export const Ionicons = mockIcon;
// Add other icon sets as needed
module.exports = {
FontAwesome6: 'FontAwesome6',
};
1 change: 1 addition & 0 deletions frontend/occupi-mobile4/__mocks__/fileMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = 'test-file-stub';
42 changes: 42 additions & 0 deletions frontend/occupi-mobile4/__mocks__/gluestack-ui-themed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// __mocks__/gluestack-ui-themed.js

import React from 'react';

const mockComponent = (name) => {
return function(props) {
return React.createElement(name, props, props.children);
};
};

module.exports = {
Box: mockComponent('Box'),
Center: mockComponent('Center'),
useToast: () => ({
show: jest.fn(),
}),
Text: mockComponent('Text'),
Button: mockComponent('Button'),
Input: mockComponent('Input'),
Icon: mockComponent('Icon'),
Image: mockComponent('Image'),
Spinner: mockComponent('Spinner'),
ScrollView: mockComponent('ScrollView'),
FlatList: mockComponent('FlatList'),

};

module.exports = {
Text: 'Text',
View: 'View',
Image: 'Image',
Card: 'Card',
Toast: 'Toast',
useToast: () => ({
show: jest.fn(),
}),
ToastTitle: 'ToastTitle',
Button: 'Button',
ButtonText: 'ButtonText',
};

export default mockComponent;
2 changes: 2 additions & 0 deletions frontend/occupi-mobile4/__mocks__/imageMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// __mocks__/imageMock.js
module.exports = 'test-file-stub';
3 changes: 3 additions & 0 deletions frontend/occupi-mobile4/__mocks__/react-native-chart-kit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
LineChart: 'LineChart',
};
21 changes: 18 additions & 3 deletions frontend/occupi-mobile4/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
module.exports = function (api) {
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
presets: [
'babel-preset-expo',
'@babel/preset-env',
'@babel/preset-react',
'@babel/preset-flow',
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-transform-react-jsx',
["@babel/plugin-transform-class-properties", { "loose": true }],
["@babel/plugin-transform-private-methods", { "loose": true }],
["@babel/plugin-transform-private-property-in-object", { "loose": true }],
'@babel/plugin-transform-runtime',
'react-native-reanimated/plugin', // Add this if you're using reanimated
],
};
};
};
2 changes: 1 addition & 1 deletion frontend/occupi-mobile4/components/GradientButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StyleSheet, TouchableOpacity } from 'react-native';
import { Heading } from '@gluestack-ui/themed';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen';

const GradientButton = ({ onPress, text }) => {
const GradientButton = ({ onPress, text,testID }) => {
return (
<LinearGradient
testID="gradient-button"
Expand Down
4 changes: 2 additions & 2 deletions frontend/occupi-mobile4/components/ThemedText.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Text, type TextProps, StyleSheet } from 'react-native';

import React from 'react';
import { Text, TextProps, StyleSheet } from 'react-native';
import { useThemeColor } from '@/hooks/useThemeColor';

export type ThemedTextProps = TextProps & {
Expand Down
16 changes: 10 additions & 6 deletions frontend/occupi-mobile4/components/__tests__/ThemedText-test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import * as React from 'react';
import React from 'react';
import renderer from 'react-test-renderer';

import { ThemedText } from '../ThemedText';

it(`renders correctly`, () => {
const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON();
jest.mock('@/hooks/useThemeColor', () => ({
useThemeColor: jest.fn().mockReturnValue('#000000'),
}));

expect(tree).toMatchSnapshot();
});
describe('ThemedText', () => {
it('renders correctly', () => {
const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON();
expect(tree).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ThemedText renders correctly 1`] = `
<div
className="css-text-146c3p1"
dir="auto"
style={
{
"color": "rgba(0,0,0,1.00)",
"fontSize": "16px",
"lineHeight": "24px",
}
}
>
Snapshot test!
</div>
`;

exports[`renders correctly 1`] = `
<Text
style={
Expand Down
25 changes: 25 additions & 0 deletions frontend/occupi-mobile4/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
preset: 'jest-expo',
setupFilesAfterEnv: ['./jest.setup.js'],
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|@react-native(-community)?|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|react-native-modal-datetime-picker|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|@gluestack-ui|expo-blur|expo-linear-gradient|expo-router|react-native-chart-kit|@ui-kitten/.*)'
],
moduleNameMapper: {
'^react-native$': 'react-native-web',
'^@/(.*)$': '<rootDir>/$1',
'^react-native-chart-kit$': '<rootDir>/__mocks__/react-native-chart-kit.js',
'^@gluestack-ui/themed$': '<rootDir>/__mocks__/gluestack-ui-themed.js',
'^@expo/vector-icons$': '<rootDir>/__mocks__/expo-vector-icons.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/imageMock.js'
},
testEnvironment: 'jsdom',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
globals: {
'ts-jest': {
babelConfig: true,
},
},
};
192 changes: 192 additions & 0 deletions frontend/occupi-mobile4/jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
import 'react-native-gesture-handler/jestSetup';
import '@testing-library/jest-native/extend-expect';
jest.mock('@react-navigation/stack', () => {
return {
createStackNavigator: jest.fn(() => ({
Navigator: 'Navigator',
Screen: 'Screen',
})),
};
});

jest.mock('@react-navigation/native', () => {
return {
...jest.requireActual('@react-navigation/native'),
useNavigation: () => ({
navigate: jest.fn(),
goBack: jest.fn(),
}),
};
});

jest.mock('react-native', () => {
const RN = jest.requireActual('react-native');
return {
...RN,
NativeModules: {
...RN.NativeModules,
SettingsManager: {
settings: { AppleLocale: 'en_US' },
get: jest.fn(),
set: jest.fn(),
},
StatusBarManager: {
getHeight: jest.fn(),
},
},
StyleSheet: {
...RN.StyleSheet,
create: (styles) => styles,
hairlineWidth: 1,
},
Dimensions: {
get: jest.fn().mockImplementation((dim) => {
switch (dim) {
case 'window':
return { width: 360, height: 640, scale: 2, fontScale: 2 };
case 'screen':
return { width: 360, height: 640, scale: 2, fontScale: 2 };
default:
return { width: 360, height: 640, scale: 2, fontScale: 2 };
}
}),
set: jest.fn(),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
screen: {
width: 360,
height: 640,
scale: 2,
fontScale: 2,
},
window: {
width: 360,
height: 640,
scale: 2,
fontScale: 2,
},
},
PixelRatio: {
get: jest.fn(() => 2),
getFontScale: jest.fn(() => 2),
getPixelSizeForLayoutSize: jest.fn((size) => size * 2),
roundToNearestPixel: jest.fn((size) => Math.round(size)),
},
};
});

jest.mock('react-native-gesture-handler', () => {
const View = require('react-native/Libraries/Components/View/View');
return {
GestureHandlerRootView: View,
Swipeable: View,
DrawerLayout: View,
State: {},
ScrollView: View,
Slider: View,
Switch: View,
TextInput: View,
ToolbarAndroid: View,
ViewPagerAndroid: View,
DrawerLayoutAndroid: View,
WebView: View,
NativeViewGestureHandler: View,
TapGestureHandler: View,
FlingGestureHandler: View,
ForceTouchGestureHandler: View,
LongPressGestureHandler: View,
PanGestureHandler: View,
PinchGestureHandler: View,
RotationGestureHandler: View,
RawButton: View,
BaseButton: View,
RectButton: View,
BorderlessButton: View,
FlatList: View,
gestureHandlerRootHOC: jest.fn(),
Directions: {},
};
});

jest.mock('react-native-reanimated', () => {
const Reanimated = require('react-native-reanimated/mock');
Reanimated.default.call = () => {};
return Reanimated;
});

jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');

jest.mock('@expo/vector-icons', () => {
const React = require('react');
const PropTypes = require('prop-types');

const MockIcon = (props) => {
return React.createElement('svg', {
...props,
children: props.children || 'icon',
});
};

MockIcon.propTypes = {
name: PropTypes.string,
};

return {
Ionicons: MockIcon,
Octicons: MockIcon,
Feather: MockIcon,
FontAwesome6: MockIcon,
};
});

jest.mock('react-native-safe-area-context', () => ({
SafeAreaProvider: ({ children }) => children,
useSafeAreaInsets: () => ({ top: 0, right: 0, bottom: 0, left: 0 }),
}));

jest.mock('expo-blur', () => {
const React = require('react');
const MockBlurView = (props) => {
return React.createElement('view', props, props.children);
};
return {
BlurView: MockBlurView,
};
});

jest.mock('react-native-responsive-screen', () => ({
widthPercentageToDP: jest.fn(),
heightPercentageToDP: jest.fn(),
}));

jest.mock('expo-router', () => ({
useRouter: () => ({
push: jest.fn(),
}),
}));

jest.mock('@gluestack-ui/themed', () => ({
...jest.requireActual('@gluestack-ui/themed'),
useToast: () => ({
show: jest.fn(),
}),
}));

jest.mock('@react-native-async-storage/async-storage', () => require('@react-native-async-storage/async-storage/jest/async-storage-mock'));
jest.mock('expo-linear-gradient', () => ({
LinearGradient: 'LinearGradient',
}));

jest.mock('react-native/Libraries/Settings/Settings', () => ({
get: jest.fn(),
set: jest.fn(),
}));

jest.mock('react-native/Libraries/TurboModule/TurboModuleRegistry', () => ({
getEnforcing: jest.fn(() => ({
getConstants: () => ({}),
get: jest.fn(),
set: jest.fn(),
})),
}));

Loading