gesDeportiva uses Jest for unit and component testing, withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/martiigarcia/gesdeportiva/llms.txt
Use this file to discover all available pages before exploring further.
react-test-renderer to render React Native components in a pure JavaScript environment — no simulator or emulator required. ESLint with the @react-native-community shared config enforces consistent code style across the project.
Jest configuration
The Jest preset is declared directly inpackage.json:
package.json
react-native preset configures the transform pipeline, module name mapper, and test environment so that React Native components can be tested without a native runtime. Babel transforms are handled by babel-jest using the Metro preset:
babel.config.js
package.json:
| Package | Version | Purpose |
|---|---|---|
jest | ^26.6.3 | Test runner |
babel-jest | ^26.6.3 | Babel transform for Jest |
react-test-renderer | 18.0.0 | Renders React Native components to JSON |
react-test-renderer must be the same version as react (18.0.0). A version mismatch will cause tests to fail with a peer dependency warning.Running tests
Test files
Tests live in the__tests__/ directory. The project currently includes one test file:
App-test.js
This smoke test verifies that the rootApp component renders without throwing:
__tests__/App-test.js
import 'react-native' line at the top is required by react-test-renderer — it must be imported before the renderer. The test creates a full render of <App /> using renderer.create(). If the component throws during render, the test fails.
Linting with ESLint
gesDeportiva uses ESLint with the@react-native-community shared configuration, which enforces React Native best practices and code style:
.eslintrc.js
eslint ., which checks all JavaScript and JSX files in the project root according to the rules defined in @react-native-community/eslint-config.
The
root: true setting prevents ESLint from looking for configuration files in parent directories, ensuring only this project’s config applies.