NativeScript / NativeScript/nx
NativeScript application with jest tests are not compatible (nx)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 68
- Forks
- 15
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Problem mit create-nx-workspace, @nativescript/nx und der generierten App und führe anschließend npx nx run :test:ios aus. Vergleiche das standardmäßige NativeScript-Testsetup mit der im Issue beschriebenen Jest-Konfiguration und untersuche das verlinkte nativescript-jest-Repository. Als erledigt gilt die Aufgabe, wenn die Tests der generierten NativeScript-App mit Jest ausgeführt werden und Angular-Module und -Imports korrekt interpretiert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- mobile, testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100