Skip to content

Commit 343f10e

Browse files
authored
Merge pull request #275 from rootlinux2/trans-doc-testing
Fix: Translate Testing Overview doc to Spanish
2 parents 1b18f9e + d88a632 commit 343f10e

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

content/docs/testing.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
---
22
id: testing
3-
title: Testing Overview
3+
title: Visión general de Pruebas
44
permalink: docs/testing.html
55
redirect_from:
66
- "community/testing.html"
77
next: testing-recipes.html
88
---
99

10-
You can test React components similar to testing other JavaScript code.
10+
Puedes probar un componente de React similar a como pruebas otro código JavaScript.
1111

12-
There are a few ways to test React components. Broadly, they divide into two categories:
12+
Hay varias formas de probar un componente React, la mayoría se agrupan en dos categorías:
1313

14-
* **Rendering component trees** in a simplified test environment and asserting on their output.
15-
* **Running a complete app** in a realistic browser environment (also known as “end-to-end” tests).
14+
* **Renderizado del árbol de componentes** en un entorno de prueba simplificado y comprobando sus salidas.
15+
* **Ejecutando la aplicación completa** en un entorno de prueba más realista utilizando un navegador web (más conocido como pruebas “end-to-end”).
1616

17-
This documentation section focuses on testing strategies for the first case. While full end-to-end tests can be very useful to prevent regressions to important workflows, such tests are not concerned with React components in particular, and are out of scope of this section.
17+
Esta sección de la documentación está enfocada en estrategias de prueba para el primer caso. Mientras las pruebas de tipo “end-to-end” pueden ser muy útiles para prever regresiones a flujos de trabajos importantes, estas pruebas no están relacionadas con los componentes React particularmente y están fuera del alcance de esta sección.
1818

19-
### Tradeoffs {#tradeoffs}
19+
### Concesiones {#tradeoffs}
2020

2121

22-
When choosing testing tools, it is worth considering a few tradeoffs:
22+
Cuando estás eligiendo las herramientas para realizar las pruebas, vale la pena considerar algunas Concesiones:
2323

24-
* **Iteration speed vs Realistic environment:** Some tools offer a very quick feedback loop between making a change and seeing the result, but don't model the browser behavior precisely. Other tools might use a real browser environment, but reduce the iteration speed and are flakier on a continuous integration server.
25-
* **How much to mock:** With components, the distinction between a "unit" and "integration" test can be blurry. If you're testing a form, should its test also test the buttons inside of it? Or should a button component have its own test suite? Should refactoring a button ever break the form test?
24+
* **Velocidad de iteración vs Entorno realista:** Algunas herramientas ofrecen un ciclo de retroalimentación muy rápido entre hacer un cambio y ver el resultado, pero no modelan el comportamiento del navegador con precisión. Otras herramientas pueden usar un entorno de navegador real, pero reducen la velocidad de iteración y son menos confiables en un servidor de integración continua.
25+
* **Cuanto abarcar:** Cuando pruebas componentes la diferencia entre Prueba Unitaria y Prueba de Integración puede ser borrosa. Si estas probando un formulario, se deben probar los botones del formulario en esta prueba? O el componente del botón debe tener su propia suit de pruebas? Debería la refactorización del botón afectar el resultado de las pruebas del formulario?
2626

27-
Different answers may work for different teams and products.
27+
Diferentes respuestas pueden funcionar para diferentes equipos y diferentes productos.
2828

29-
### Recommended Tools {#tools}
29+
### Herramientas recomendadas {#tools}
3030

31-
**[Jest](https://facebook.github.io/jest/)** is a JavaScript test runner that lets you access the DOM via [`jsdom`](#mocking-a-rendering-surface). While jsdom is only an approximation of how the browser works, it is often good enough for testing React components. Jest provides a great iteration speed combined with powerful features like mocking [modules](#mocking-modules) and [timers](#mocking-timers) so you can have more control over how the code executes.
31+
**[Jest](https://facebook.github.io/jest/)** Es una biblioteca de JavaScript para ejecución de pruebas que permite acceder al DOM mediante [`jsdom`](/docs/testing-environments.html#mocking-a-rendering-surface). Aunque JSDOM solo se aproxima a como realmente los navegadores web trabajan, usualmente es suficiente para probar los componentes React. Jest brinda una gran velocidad de iteración combinada con potentes funcionalidades como simular [módulos](/docs/testing-environments.html#mocking-modules) y [temporizadores](/docs/testing-environments.html#mocking-timers) esto permite tener mayor control sobre como se ejecuta el código.
3232

33-
**[React Testing Library](https://testing-library.com/react)** is a set of helpers that let you test React components without relying on their implementation details. This approach makes refactoring a breeze and also nudges you towards best practices for accessibility. Although it doesn't provide a way to "shallowly" render a component without its children, a test runner like Jest lets you do this by [mocking](/docs/testing-recipes.html#mocking-modules).
33+
**[Biblioteca de Pruebas para React](https://testing-library.com/react)** es una biblioteca de utilidades que te ayudan a probar componentes React sin depender de los detalles de su implementación. Este enfoque simplifica la refactorización y también lo empuja hacia las mejores prácticas de accesibilidad, aunque no proporciona una forma de renderizar "superficialmente" un componente sin sus hijos, Jest te permite hacerlo gracias a su funcionalidad para [simular](/docs/testing-recipes.html#mocking-modules).
3434

35-
### Learn More {#learn-more}
35+
### Más Información {#learn-more}
3636

37-
This section is divided in two pages:
37+
Esta sección esta dividida en dos paginas:
3838

39-
- [Recipes](/docs/testing-recipes.html): Common patterns when writing tests for React components.
40-
- [Environments](/docs/testing-environments.html): What to consider when setting up a testing environment for React components.
39+
- [Recetas](/docs/testing-recipes.html): Patrones comunes cuando escribes pruebas para componentes React.
40+
- [Entornos](/docs/testing-environments.html): Que debes considerar cuando estes configurando un entorno de pruebas para componentes React.

0 commit comments

Comments
 (0)