NativeScript / NativeScript/nativescript-cli
unit tests - no reachable hosts
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
Description
I'm writing an app with Angular 8+ and NativeScript 6+.
I want to get unit tests working and I'd prefer to use karma.
I followed the directions on the web page exactly and created a fresh project:
https://docs.nativescript.org/tooling/testing/testing
When I run the command tns test android the tests don't run and on the device it says: 'no reachable hosts'
I don't see any errors on the terminal.
Environment:
- Android version 10
- tns --version 6.4.1
- NodeJS : v12.4.0
- npm : 4.6.1
- OS : Windows 10

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the NativeScript testing documentation linked in the report and reproduce the issue using tns test android on the listed Android and Windows environment. Trace why the device reports “no reachable hosts” despite no terminal errors; done means the fresh project's Karma unit tests run successfully on Android.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, angular, javascript, node.js
- Domain
- cli, mobile, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100