Is there a way to run t…

less than 1 minute read

Is there a way to run test against all apps and libraries? My use case is I would like to generate code coverage for the repository as a whole and us that as a PR gate.

Responses:

Yup!

nx affected:test --all

or ng affected:test --all if you use the angular cli

Great thanks! However this is generating separate reports. Is there a way to aggregate into a single repository level report?

You would need to run jest through the jest cli instead of through Nx then.

Unless someone else has an idea

I believe, if you use cobertura, there is a way with Istanbul to aggregate those reports into one

We did it at work a while back, I can look for more details in the AM if you’d like

thanks for the hint. That actually makes sense and I believe cobertura is the desired output format anyway. I’ll hit ya up if I hit a wall but that makes sense to me. Appreciate it!

:+1:

Updated: