NativeScript / NativeScript/nativescript-cli

unit tests - no reachable hosts

Open
#5,283 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

unit testing
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

Screenshot_20200318-190116_Fresh2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.