NativeScript / NativeScript/nx
NativeScript application with jest tests are not compatible (nx)
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 68
- Forks
- 15
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
By following the steps you indicate:
npx create-nx-workspace@latest (monorepo with a web app or a typescript app, indifferently)
npm install --save-dev @nativescript/nx.
npx nx g @nativescript/nx:app
Once you have the app created, if you use the command npx nx run <app-name>:test:ios the default NativeScript app created by NativeScript does not use jest, and sends you to start the tests using mocha, jasmine or qunit.
When you change the configuration to use jest (like web app), if you launch the app it doesn't know how to interpret angular modules and imports.
The "moduleResolution" configuration is not able to interpret it correctly so it always fails.
The tests that you have in your repository for the nativesscript application also fail.
These are the errors it gives:

I leave here the repository where you can find this test project: https://github.com/harikasin/nativescript-jest
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
Reproduce el problema con create-nx-workspace, @nativescript/nx y la aplicación generada; después, ejecuta npx nx run :test:ios. Compara la configuración de pruebas predeterminada de NativeScript con la configuración de Jest descrita en el issue e inspecciona el repositorio nativescript-jest enlazado. Se considera terminado cuando las pruebas de la aplicación NativeScript generada se ejecutan con Jest e interpretan correctamente los módulos e imports de Angular.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- mobile, testing-qa
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100