-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
es-testing-testing-environments #277
es-testing-testing-environments #277
Conversation
|
||
In most cases, jsdom behaves like a regular browser would, but doesn't have features like [layout and navigation](https://github.com/jsdom/jsdom#unimplemented-parts-of-the-web-platform). This is still useful for most web-based component tests, since it runs quicker than having to start up a browser for each test. It also runs in the same process as your tests, so you can write code to examine and assert on the rendered DOM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No estoy seguro como traducir layout
. Hay dos coincidencias de la palabra en el documento. Atento a las sugerencias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creo que en este caso está bien dejarlo como layout
- qué opinan @carburo @Darking360 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sí, puede ser, creo que muchas veces se usa el término en inglés a falta de una traducción lo suficientemente satisfactoria. Quizá podríamos luego evaluar las diferentes alternativas y a partir de la decisión ponerlo en la lista de traducciones comunes para futuras referencias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De acuerdo en dejarlo como layout
, las traducciones literales a la palabra no quedan bien dentro de este contexto, lo podriamos dejar asi y luego revisar bien el glosario y actulizarlo como menciona @carburo 🚀
|
||
This is especially useful for data fetching. It is usually preferable to use "fake" data for tests to avoid the slowness and flakiness due to fetching from real API endpoints [<small>(example)</small>](/docs/testing-recipes.html#data-fetching). This helps make the tests predictable. Libraries like [Jest](https://jestjs.io/) and [sinon](https://sinonjs.org/), among others, support mocked functions. For end-to-end tests, mocking network can be more difficult, but you might also want to test the real API endpoints in them anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decidi por dejar API Endpoints
en su idioma original. En otro articulo observe que se traducia a remote endpoint
-> punto final remoto
y en mi opinión no se ve bien dentro del contexto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, de acuerdo! Gracias por aclarar tu decisión!
|
||
In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backend
fue otra traducción de la que no estoy seguro. Me parece que también deberia mantenerse la palabra. Atento igualmente.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for es-reactjs ready! Built with commit 2fb5c4a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Gerson4G, gracias por tu aporte, bienvenido al proyecto!
Me parece que este PR está bien, pero dejo abierta la pregunta sobre cambiar Biblioteca
por Librería
, además de layout
.
Si @carburo o @Darking360 les parece 👍 como están las cosas podemos proceder con el merge!
Muchas gracias nuevamente!!!!!!
|
||
### Test runners {#test-runners} | ||
### Bibliotecas de ejecución de pruebas {#test-runners} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola @Gerson4G! Qué tal te suena Librerías
en vez de Bibliotecas
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
También puede ser, pero entonces se debería buscar una estandarización para este tipo de palabras (Test Runners) ya que elegí "Bibliotecas" debido a la traducción realizada en esta página donde Jest is a JavaScript test runner
-> Jest Es una biblioteca de JavaScript para ejecución de pruebas
🤔 @carburo @Darking360.
Librería
sí suena mejor para mí, no se si quizás cambiar acá y crear el PR para los otros lados de la documentación donde se le haga referencia aTest Runner
que lleve Biblioteca
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De hecho, en la lista de traducciones comunes está traducido como biblioteca y ha sido lo más común en otras traducciones en aras de mantener la consistencia. Para ser honesto, prefiero biblioteca al calco semántico, pero no me importaría que revisaramos esa decisión. En cualquier caso en el artículo se usa indistintamente biblioteca y librería y sí creo que al menos dentro del artículo se mantenga la consistencia y se elija solo uno u otro término.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En este caso tambien me guié de la lista de traducciones comunes, en su momento muy al inicio de las traducciones se acordó usar Biblioteca
por el contexto si mal no recuerdo, eso o se parecía mucho al error de la traducción literal de support
que es soportar
pero en realidad traduce a compatible
por ejemplo, aunque tambien lo podríamos revisar, de una u otra forma como menciona @carburo no esta mal, aunque debemos mantener la consistencia, si vamos al caso, por ahora se seguiría utilizando Biblioteca
👍
|
||
In most cases, jsdom behaves like a regular browser would, but doesn't have features like [layout and navigation](https://github.com/jsdom/jsdom#unimplemented-parts-of-the-web-platform). This is still useful for most web-based component tests, since it runs quicker than having to start up a browser for each test. It also runs in the same process as your tests, so you can write code to examine and assert on the rendered DOM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creo que en este caso está bien dejarlo como layout
- qué opinan @carburo @Darking360 ?
|
||
This is especially useful for data fetching. It is usually preferable to use "fake" data for tests to avoid the slowness and flakiness due to fetching from real API endpoints [<small>(example)</small>](/docs/testing-recipes.html#data-fetching). This helps make the tests predictable. Libraries like [Jest](https://jestjs.io/) and [sinon](https://sinonjs.org/), among others, support mocked functions. For end-to-end tests, mocking network can be more difficult, but you might also want to test the real API endpoints in them anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, de acuerdo! Gracias por aclarar tu decisión!
|
||
In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Muchísimas gracias @Gerson4G por la traducción. Como ya estaba haciendo una reseña de este artículo sumo a la de @alejandronanez algunas sugerencias, sobre todo algunas erratas que encontré y comenté sobre la cuestión de «bibliotecas» y «librerías». También noto que olvidaste traducir el título de la publicación.
|
||
### Test runners {#test-runners} | ||
### Bibliotecas de ejecución de pruebas {#test-runners} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De hecho, en la lista de traducciones comunes está traducido como biblioteca y ha sido lo más común en otras traducciones en aras de mantener la consistencia. Para ser honesto, prefiero biblioteca al calco semántico, pero no me importaría que revisaramos esa decisión. En cualquier caso en el artículo se usa indistintamente biblioteca y librería y sí creo que al menos dentro del artículo se mantenga la consistencia y se elija solo uno u otro término.
|
||
In most cases, jsdom behaves like a regular browser would, but doesn't have features like [layout and navigation](https://github.com/jsdom/jsdom#unimplemented-parts-of-the-web-platform). This is still useful for most web-based component tests, since it runs quicker than having to start up a browser for each test. It also runs in the same process as your tests, so you can write code to examine and assert on the rendered DOM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sí, puede ser, creo que muchas veces se usa el término en inglés a falta de una traducción lo suficientemente satisfactoria. Quizá podríamos luego evaluar las diferentes alternativas y a partir de la decisión ponerlo en la lista de traducciones comunes para futuras referencias.
content/docs/testing-environments.md
Outdated
|
||
In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well. | ||
En este escenario, podrías usar un framework como [Cypress](https://www.cypress.io/) o una libreria como [puppeteer](https://github.com/GoogleChrome/puppeteer) de forma que puedas navegar entre diferentes rutas y comprobar los efectos no solo del navegador si no potencialmente del backend también. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En este escenario, podrías usar un framework como [Cypress](https://www.cypress.io/) o una libreria como [puppeteer](https://github.com/GoogleChrome/puppeteer) de forma que puedas navegar entre diferentes rutas y comprobar los efectos no solo del navegador si no potencialmente del backend también. | |
En este escenario, podrías usar un framework como [Cypress](https://www.cypress.io/) o una librería como [puppeteer](https://github.com/GoogleChrome/puppeteer) de forma que puedas navegar entre diferentes rutas y comprobar los efectos no solo del navegador si no potencialmente del backend también. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui cambiaría libreria
por biblioteca
como se hablo anteriormente 😅
Co-Authored-By: Rainer Martínez Fraga <[email protected]>
Co-Authored-By: Rainer Martínez Fraga <[email protected]>
Co-Authored-By: Rainer Martínez Fraga <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gerson4G Se ve super, solamente puse los cambios de libreria
por biblioteca
para mantener la consistencia en todas las traducciones que hay por ahora 🚀 Despues de eso creo que estariamos listos.
CC @alejandronanez @carburo 💪
content/docs/testing-environments.md
Outdated
- Libraries like [mocha](https://mochajs.org/#running-mocha-in-the-browser) work well in real browser environments, and could help for tests that explicitly need it. | ||
- End-to-end tests are used for testing longer flows across multiple pages, and require a [different setup](#end-to-end-tests-aka-e2e-tests). | ||
- Jest es altamente compatible con proyectos de React, soportando características como [modulos simulados](#mocking-modules) y [temporizadores](#mocking-timers), y soporte [`jsdom`](#mocking-a-rendering-surface). **Si usas Create React App, [Jest ya esta incluido para usar fácilmente](https://facebook.github.io/create-react-app/docs/running-tests) con una configuracion por defecto útil.** | ||
- Librerías como [mocha](https://mochajs.org/#running-mocha-in-the-browser) funcionan bien en un entorno de navegador real, y puede ayudar con pruebas que necesiten de ello explícitamente. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Librerías como [mocha](https://mochajs.org/#running-mocha-in-the-browser) funcionan bien en un entorno de navegador real, y puede ayudar con pruebas que necesiten de ello explícitamente. | |
- Bibliotecas como [mocha](https://mochajs.org/#running-mocha-in-the-browser) funcionan bien en un entorno de navegador real, y puede ayudar con pruebas que necesiten de ello explícitamente. |
content/docs/testing-environments.md
Outdated
|
||
On Node.js, runners like Jest [support mocking modules](https://jestjs.io/docs/en/manual-mocks). You could also use libraries like [`mock-require`](https://www.npmjs.com/package/mock-require). | ||
En Node.js, bibliotecas como Jest soportan la [simulación de módulos](https://jestjs.io/docs/en/manual-mocks). También podrías usar librerías como [`mock-require`](https://www.npmjs.com/package/mock-require). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En Node.js, bibliotecas como Jest soportan la [simulación de módulos](https://jestjs.io/docs/en/manual-mocks). También podrías usar librerías como [`mock-require`](https://www.npmjs.com/package/mock-require). | |
En Node.js, bibliotecas como Jest soportan la [simulación de módulos](https://jestjs.io/docs/en/manual-mocks). También podrías usar bibliotecas como [`mock-require`](https://www.npmjs.com/package/mock-require). |
content/docs/testing-environments.md
Outdated
|
||
In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well. | ||
En este escenario, podrías usar un framework como [Cypress](https://www.cypress.io/) o una libreria como [puppeteer](https://github.com/GoogleChrome/puppeteer) de forma que puedas navegar entre diferentes rutas y comprobar los efectos no solo del navegador si no potencialmente del backend también. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui cambiaría libreria
por biblioteca
como se hablo anteriormente 😅
Co-Authored-By: Rainer Martínez Fraga <[email protected]>
@Darking360 @carburo Cambios realizados |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you @Gerson4G
Traducción de la seccion "Testing Environments" al español.
Ayuda solicitada en #273
Atento a las recomendaciones @Darking360 @carburo