Collection of Ionic Mocks for Use in Every Project
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- testing
Línea de trabajo
Comienza revisando el archivo referenciado Clicker src/mocks.ts, el gist enlazado y la discusión de siete comentarios. El issue no define qué mocks de Ionic se deben incluir, dónde deben ubicarse ni cómo se deben validar, por lo que habría que acordar el alcance y los criterios de aceptación antes de la implementación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
EDIT: I just realized that the main place I've grabbed Ionic mock from was the Clicker project. mocks.ts. Thanks to @lathonez for making this file available.
I created this issue to begin a discussion around mock objects in Ionic (and I'm not sure where else to have this discussion).
I've been doing a lot of unit testing lately for an Ionic 2 application. One of the things I've found to be very helpful is that there appear to be many mock objects available out there for use in Ionic unit testing. I've put together a few objects that I've needed in a current project into one file so that I can reference them. Take a look.
FYI:
- While I have made adjustments to this code, it is not mine. I've found these objects sprinkled over Stack Overflow and else where.
- These mocks are working for me, but Your Mileage May Vary.
Here's my issue. For this project, having reliable Ionic mocks is important. We should be unit testing our applications, not the Ionic Framework. There is no reason for each of us to be building their own set of Ionic mocks. As a community, we should be able to assemble these mocks.
Shouldn't we be able to provide mocks for as many of the Ionic pieces that may be needed?
Shouldn't we be able to provide best practices as to where to place these mocks and how to use them?
Re: Best practices: Currently, I have three files in my project:
src/testing/mock-ionic.ts: Ionic mockssrc/testing/mock-app.ts: mocks of object created in my projectsrc/testing/mock-data.ts: mock data that I can use with my mock services
This is how I've organized my current project. Again, YMMV.
Let the discussion begin.
- Lenguaje dominante
- TypeScript
- Estrellas
- 370
- Forks
- 144
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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 ionic-team/ionic-unit-testing-example
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 20/100
-
Error output is minified Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
ionic-team/ionic-unit-testing-example#91 · 7 comentarios · 11 reacciones ·
Todos los issues de ionic-team/ionic-unit-testing-example
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
mksglu/context-mode#1200 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anthropics/claude-code#96687 ·
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
AOSSIE-Org/DebateAI#582 · 2 comentarios ·