NativeScript / NativeScript/nx

Not able to run unit tests successfully in an integrated nx monorepo.

Open
#78 0 comments 0 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

I have an integrated nx monorepo with a directory structure as follows.

apps/nativescript-saas which has my nativescript app written with angular

libs/nativescript contains some base components for which are extended by nativescript app.
libs/shared contains some shared components which I also use for my web-app

I have all the configs in place and my libs are referenced in ts.config both spec and app.

The issue is that my tests files do not recognise the code libs in libs directory although when I run it normally everything works fine. I have looked at the the unit test v3 runner here Link but it doesn't also work as expected.

My question is of there is any reference repo where this was setup and tested? Or it could potentially be an issue.

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 integrated Nx layout under apps/nativescript-saas and libs/nativescript and libs/shared, then compare the ts.config references used by the app and spec configurations. Review the NativeScript unit test v3 runner guidance linked in the issue and reproduce the test command; done means unit tests resolve the library code and run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.