Complete the code to import Jest in a React Native test file.
import [1] from 'jest';
You import jest to access Jest's testing functions and mocks.
Complete the code to define a test case using Jest.
test('renders correctly', () => [1]);
render directly inside test without assertions.describe inside test which is incorrect.The test function needs a callback with assertions like expect to check conditions.
Fix the error in the Jest mock setup for a React Native module.
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper', () => [1]);
Jest expects a module mock to be an object, so returning an empty object {} avoids errors.
Fill both blanks to configure Jest to transform JavaScript files correctly.
"transform": {"^.+\\.[1]$": "[2]"},
The transform key uses a regex for .jsx files and the transformer babel-jest to compile them.
Fill all three blanks to write a Jest test that checks if a component renders a text.
import { render, screen } from '@testing-library/react-native'; import App from './App'; test('shows welcome text', () => { render(<[1] />); const textElement = screen.getByText(/[2]/i); expect(textElement).toBe[3](); });
toBeFalsy which expects the element not to exist.You render the App component, look for text containing 'Welcome', and expect it to be truthy (found).