NativeScript application with jest tests are not compatible (nx)

オープン
#68 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
typescript
領域
mobile, testing-qa

調査の方向性

create-nx-workspace、@nativescript/nx、生成されたアプリで問題を再現し、その後 npx nx run :test:ios を実行します。NativeScript のデフォルトのテストセットアップと、issue で説明されている Jest 設定を比較し、リンク先の nativescript-jest リポジトリを調査します。生成された NativeScript アプリのテストが Jest で実行され、Angular のモジュールと import を正しく解釈できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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:
imagen

I leave here the repository where you can find this test project: https://github.com/harikasin/nativescript-jest

主要言語
TypeScript
スター
68
フォーク
15
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NativeScript/nx のほかの issue

NativeScript/nx の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。