nickbullock
nickbullock

Reputation: 6599

How to pass arguments to ng-cli through nx affected:test?

I want to pass some arguments to ng test command when running affected projects (for CI purposes).
For example: ng test --codeCoverage=true --watch=false --progress=false.
How it can be done through nx affected:test?
Tried nx affected --help, but it doesn't contain such information.
As a naive solution i can write custom node script, execute and get result of nx print-affected and then run commands from this result, but I want to find more efficient way.

Upvotes: 8

Views: 4603

Answers (1)

nickbullock
nickbullock

Reputation: 6599

I found out that nx-cli redirects all unknown parameters to ng-cli.
So it can be done like: nx affected:test --codeCoverage --watch=false --progress=false.
UPD:
I can't find it in the docs, but running nx serve will throw message like: NX NOTE

Upvotes: 6

Related Questions