NativeScript / NativeScript/nativescript-cli
Feature Request: Provision to put test files in feature folder instead of tests folder
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.1k
- Forks
- 204
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 8
Descripción
From @shripalsoni04 on September 30, 2016 15:2
It will be great if we can put our test files in the respective feature folder instead of putting all the test files in app/tests folder.
When we do development for web version of angular application, we put the test files in respective feature folders with .spec.ts suffix as per the angular style guide.
If we can do the same thing in angularNative app also, it will be very easy to get started and it will open a way for unit-test code sharing. As currently we have different structures for test files in nativescript and web version, we cannot share the unit-test files easily and we need to manually copy the unit-test files and change the import path of the module being tested in test file for any cross platform shared code.
I thought to run a script which copies all the .spec.ts file to tests folder from feature folders, but then it will add complexities like adding new/changed test files back to app/tests folder in watch mode.
Let me know if there is already some way and I am missing that.
Thanks.
Copied from original issue: NativeScript/nativescript-angular#482
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.
Línea de trabajo
Empieza por localizar cómo la CLI descubre y gestiona actualmente los archivos de prueba en app/tests, incluido el comportamiento en modo watch. Compara ese flujo con los archivos .spec.ts solicitados en las carpetas de funcionalidades y determina el comportamiento esperado para las pruebas compartidas; el trabajo estará terminado cuando se admitan pruebas locales de cada funcionalidad sin copiado manual.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- cli, testing
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100