NativeScript / NativeScript/nativescript-cli
test init messes up project
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 204
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 8
説明
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
✔ Getting NativeScript components versions information...
✔ Component nativescript has 7.0.8 version and is up to date.
✔ Component @nativescript/core has 7.0.3 version and is up to date.
✔ Component @nativescript/ios has 7.0.0 version and is up to date.
✖ Component @nativescript/android is not installed.
Describe the bug
Trying to run unit tests fails with the following error:
Error: Cannot use import statement outside a module
at Errors.failWithOptions (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:157:27)
at Errors.fail (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:130:21)
at DevicesService.<anonymous> (/usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/devices-service.js:425:30)
at Generator.throw (<anonymous>)
at rejected (/usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/devices-service.js:12:65)
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
name: 'Exception',
errorCode: 127,
suggestCommandHelp: false,
proxyAuthenticationRequired: false,
printOnStdout: undefined
}
To Reproduce
tns create demo-test --tsc
tns test init #select mocha
tns test ios
Expected behavior
Tests to run.
Sample project
Additional context
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
tns create demo-test --tsc、tns test init、tns test ios で失敗を再現し、その後 lib/common/mobile/mobile-core/devices-service.js に報告されている CLI パスを調べます。Mocha テストのセットアップがどのように初期化されるかを追跡し、生成された TypeScript プロジェクトが import エラーなしで iOS テストを実行できるようにするには何を変更する必要があるかを特定します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- cli, testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100