Skip to content

Commit 95c6a22

Browse files
Merge pull request #130 from tmjoseantonio/shallow-renderer-spanish-translation
Shallow renderer spanish translation
2 parents 398aa5e + 64e2c19 commit 95c6a22

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

TRANSLATION.md

+4
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,15 @@ Aquí hay algunas sugerencias para la traducción de términos de uso común en
110110
| ------------------ | ---------- |
111111
| array | *array* |
112112
| arrow function | función flecha |
113+
| assert | comprobar |
113114
| bug | error |
114115
| bundler | *bundler* |
115116
| camelCase | *camelCase* |
116117
| callback | *callback* |
118+
| camelCase | *camelCase* |
117119
| controlled component | componente controlado |
118120
| debugging | depuración |
121+
| DOM | DOM |
119122
| framework | *framework* |
120123
| function component | componente de función |
121124
| hook | *hook* |
@@ -126,6 +129,7 @@ Aquí hay algunas sugerencias para la traducción de términos de uso común en
126129
| props | *props* |
127130
| React element | Elemento de React |
128131
| render | renderizar (verb), renderizado (noun)
132+
| shallow rendering | renderizado superficial |
129133
| state | estado |
130134
| string | *string* |
131135
| template literals | *template literals* |
+16-16
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
id: shallow-renderer
3-
title: Shallow Renderer
3+
title: Renderizado superficial
44
permalink: docs/shallow-renderer.html
55
layout: docs
6-
category: Reference
6+
category: Referencia
77
---
88

9-
**Importing**
9+
**Importando**
1010

1111
```javascript
1212
import ShallowRenderer from 'react-test-renderer/shallow'; // ES6
1313
var ShallowRenderer = require('react-test-renderer/shallow'); // ES5 with npm
1414
```
1515

16-
## Overview {#overview}
16+
## Resumen {#resumen}
1717

18-
When writing unit tests for React, shallow rendering can be helpful. Shallow rendering lets you render a component "one level deep" and assert facts about what its render method returns, without worrying about the behavior of child components, which are not instantiated or rendered. This does not require a DOM.
18+
El renderizado superficial es util cuando escribes pruebas unitarias. El renderizado superficial te permite renderizar un componente a "un nivel de profundidad" y comprobar lo que su método de renderizado retorna sin preocuparse sobre el comportamiento de los componentes hijos, los cuales no son instanciados ni renderizados. Esto no requiere un DOM.
1919

20-
For example, if you have the following component:
20+
Por ejemplo, si tienes el siguiente componente:
2121

2222
```javascript
2323
function MyComponent() {
@@ -30,12 +30,12 @@ function MyComponent() {
3030
}
3131
```
3232

33-
Then you can assert:
33+
Entonces puedes comprobar:
3434

3535
```javascript
3636
import ShallowRenderer from 'react-test-renderer/shallow';
3737

38-
// in your test:
38+
// en tu test:
3939
const renderer = new ShallowRenderer();
4040
renderer.render(<MyComponent />);
4141
const result = renderer.getRenderOutput();
@@ -47,22 +47,22 @@ expect(result.props.children).toEqual([
4747
]);
4848
```
4949

50-
Shallow testing currently has some limitations, namely not supporting refs.
50+
Las pruebas superficiales tienen algunas limitaciones, es decir, no soportan refs.
5151

52-
> Note:
52+
> Nota:
5353
>
54-
> We also recommend checking out Enzyme's [Shallow Rendering API](http://airbnb.io/enzyme/docs/api/shallow.html). It provides a nicer higher-level API over the same functionality.
54+
> También recomendamos revisar [Shallow Rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) de Enzyme. Provee un API de alto nivel mucho mejor de la misma funcionalidad.
5555
56-
## Reference {#reference}
56+
## Referencia {#referencia}
5757

5858
### `shallowRenderer.render()` {#shallowrendererrender}
5959

60-
You can think of the shallowRenderer as a "place" to render the component you're testing, and from which you can extract the component's output.
60+
Puedes ver el shallowRenderer como un "lugar" para renderizar el componente que quieres probar, y del cual quieres extraer el resultado del componente.
6161

62-
`shallowRenderer.render()` is similar to [`ReactDOM.render()`](/docs/react-dom.html#render) but it doesn't require DOM and only renders a single level deep. This means you can test components isolated from how their children are implemented.
62+
`shallowRenderer.render()` es parecido a [`ReactDOM.render()`](/docs/react-dom.html#render) pero no necesita DOM y solamente rendeirza un único nivel de profundidad. Esto quiere decir que se pueden probar componentes sin tener en cuenta como sus hijos son implementados.
6363

6464
### `shallowRenderer.getRenderOutput()` {#shallowrenderergetrenderoutput}
6565

66-
After `shallowRenderer.render()` has been called, you can use `shallowRenderer.getRenderOutput()` to get the shallowly rendered output.
66+
Despues que `shallowRenderer.render()` es llamado, se puede usar `shallowRenderer.getRenderOutput()` para obtener el resultado superficialmente renderizado.
6767

68-
You can then begin to assert facts about the output.
68+
Entonces ya se pueden empezar a comprobar hechos sobre el resultado.

0 commit comments

Comments
 (0)