NativeScript / NativeScript/nx
NativeScript application with jest tests are not compatible (nx)
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 68
- Fork
- 15
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il problema con create-nx-workspace, @nativescript/nx e l’app generata, quindi esegui npx nx run :test:ios. Confronta la configurazione di test predefinita di NativeScript con la configurazione Jest descritta nell’issue e analizza il repository nativescript-jest collegato. Il lavoro è completato quando i test dell’app NativeScript generata vengono eseguiti con Jest e interpretano correttamente i moduli e gli import Angular.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- mobile, testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100