Document better the details of aync methods
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, typescript
- Área
- documentation, testing-qa
Línea de trabajo
Comienza con src/wait-for.js y la página vinculada dom-testing-library/api-async, y después compara la documentación existente de waitFor con las preguntas del issue sobre interval y timeout. Se considera terminado cuando la página explica ambos comportamientos de las opciones con suficiente claridad para abordar el ejemplo flaky y ayudar a los lectores a entender la temporización.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
In the example seen at the bottom of this issue, I get flaky results. The assertion passes sometimes and fails sometimes. This comes from a lack of understanding by me of how async methods work. I've Googled the heck out of it and read the docs linked below a bunch of times. I also looked through the source code, but I found it to be difficult to understand from someone who hasn't worked in this project.
Describe the solution you'd like
Ultimately, I think there are a couple of waitFor options that should be documented in more detail. I'd like the below questions to be answered.
- What is the behavior of
intervaloption? - What is the behavior of the
timeoutoption?
I think this should be covered in detail here: https://testing-library.com/docs/dom-testing-library/api-async/
Describe alternatives you've considered A clear and concise description of
any alternative solutions or features you've considered.
NA
Additional context Add any other context or screenshots about the feature
request here.
Example code that has flaky results. I don't think the details of useDataFetch is important here, but let me know if I can answer any questions about it.
it('displays fetched data', async () => {
const increment = createIncrement();
const MyComponent = () => {
const { data } = useDataFetch(async () => {
await sleep(1);
return increment();
});
return <div>times fetch called: {data}</div>;
};
render(<MyComponent />);
const element = await screen.findByText('times fetch called: 2');
expect(element).toBeInTheDocument();
});
- Lenguaje dominante
- JavaScript
- Estrellas
- 479
- Forks
- 738
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de testing-library/testing-library-docs
-
Vue - FAQ about Vue Router is outdatedPosiblemente ocupada @SatvikMishra08 la tomó hace 9 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
testing-library/testing-library-docs#1570 · 1 comentario ·
-
Broken Chrome Extension Link in Queries DocsPosiblemente ocupada @rajanpanth la tomó hace 58 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Framework wrappers and DOM testing libraryPosiblemente ocupada @jacklaurencegaray la tomó hace 420 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 38/100
testing-library/testing-library-docs#1493 · 3 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
testing-library/testing-library-docs#1486 · 1 reacción ·
Todos los issues de testing-library/testing-library-docs
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
[quality] Nothing keeps docs/skills/manifest.md in sync with docs/skills/*.mdPosiblemente ocupada @hivecommons-hive la tomó hoy. Abiertoagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
agent:blocked agent:ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
turbot/guardrails-fn#46 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
needs verification
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 6 días