NativeScript / NativeScript/nativescript-cli

Running tns test android does not detect tests and is stuck in `test: loading; `

未關閉
#5,607 3 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

os: android unit testing
主要語言
JavaScript
星號
1.1k
分支
204
平均合併
1 天 9 小時
30 天內合併 PR
8

描述

Environment

  • CLI: 8.1.4
  • karma: 6.3.7
  • karma-jasmine: 4.0.1
  • karma-webpack: 5.0.0
  • karma-nativescript-launcher: ~2.9.0

Describe the bug

I initalized tests using tns test init using jasmine. After running tns test android, in the browser the header shows test: loading and it doesn't appear to load any test files in the network tab. The mobile app that's launched on my emulator shows no tests. I did not make any modifications to the version of the dependencies or to the generated karma.conf.js. There were no errors in the logs.

To Reproduce

Run tns test init and select jasmine
Run tns test android, it launches the app with no tests displayed. In the browser, it displays test:loading

Expected behavior
My unit tests to be displayed and their status.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先使用 tns test init 重現問題,選擇 Jasmine,然後執行 tns test android;在模擬器啟動時檢查產生的 karma.conf.js 和瀏覽器網路活動。將預期的測試載入流程與觀察到的 test: loading 狀態進行比較,當初始化的單元測試及其狀態出現在瀏覽器和模擬器中時,即可視為問題已完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
android, javascript
領域
cli, mobile, testing
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。