React Native

React Native Testing

Jest, React Native Testing Library, testing hooks, testing navigation, async testing, mocking, E2E with Detox

20 คำถามสัมภาษณ์·
Mid-Level
1

What is the main role of Jest in a React Native project?

คำตอบ

Jest is the default JavaScript testing framework bundled with React Native. It handles test execution, assertions, mocking and code coverage. Unlike other tools that specialize in a particular aspect, Jest provides a complete solution natively integrated into React Native.

2

What is the main function of React Native Testing Library (RNTL)?

คำตอบ

React Native Testing Library encourages tests focused on user behavior rather than implementation details. It provides utilities to query components as a user would (by text, accessible role, placeholder), making tests more resilient to internal refactoring.

3

Which RNTL query method should be preferred to select a button with the text 'Submit'?

คำตอบ

getByText is the recommended method because it selects elements as a user would, by looking for visible text. This approach makes tests more intuitive and resilient. getByTestId requires adding testID attributes and does not reflect actual user behavior.

4

What is the difference between getBy and queryBy in RNTL?

5

How to configure Jest to skip transformations for certain node_modules in React Native?

+17 คำถามสัมภาษณ์

หัวข้อสัมภาษณ์ React Native อื่นๆ

JavaScript Essentials

Junior
25 คำถาม

React Fundamentals

Junior
20 คำถาม

React Native Basics

Junior
22 คำถาม

React Hooks

Junior
20 คำถาม

TypeScript for React & React Native

Junior
22 คำถาม

React Native Components & API

Junior
20 คำถาม

React Native Styling & Layout

Junior
18 คำถาม

React Native Navigation

Mid-Level
22 คำถาม

React Native State Management

Mid-Level
24 คำถาม

React Native Networking & API

Mid-Level
20 คำถาม

Data Persistence

Mid-Level
20 คำถาม

Forms & Validation

Mid-Level
18 คำถาม

React Native Animations

Mid-Level
22 คำถาม

Native Modules & Bridge

Mid-Level
20 คำถาม

Platform-Specific Code

Mid-Level
18 คำถาม

Permissions & Device APIs

Mid-Level
20 คำถาม

Push Notifications

Mid-Level
18 คำถาม

React Native Debugging

Mid-Level
18 คำถาม

Build & Deployment

Mid-Level
20 คำถาม

Expo vs React Native Bare

Mid-Level
18 คำถาม

Performance Optimization

Senior
24 คำถาม

Memory Management

Senior
20 คำถาม

Architecture Patterns

Senior
22 คำถาม

React Native New Architecture

Senior
24 คำถาม

Security Best Practices

Senior
20 คำถาม

Offline-First Architecture

Senior
20 คำถาม

React Native CI/CD

Senior
20 คำถาม

Monorepo & Code Sharing

Senior
18 คำถาม

Advanced Topics

Senior
22 คำถาม

App Lifecycle & Background Execution

Mid-Level
20 คำถาม

Authentication & Session Management

Mid-Level
22 คำถาม

Monitoring & Crash Reporting

Senior
20 คำถาม

เชี่ยวชาญ React Native สำหรับการสัมภาษณ์ครั้งถัดไป

เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์

เริ่มใช้ฟรี