NativeScript / NativeScript/nx

[question] How to do jest unit testing?

Open
#67 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
68
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Default template doesn't add any test target.
I'd like to use TDD to develop my app.
How can I enable jest unit testing?

I tried to use the configuration mentioned here https://github.com/NativeScript/nx/issues/8
But that just runs the app on the device.

I'd like it to be true unit tests, not e2e tests (i.e. it shouldn't be run on the device).

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 by inspecting the repository's default template and compare its testing setup with the configuration discussed in NativeScript/nx#8. Determine how Jest can run as true unit tests without launching the app on a device; done means the template exposes a working unit-test target separate from end-to-end testing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.