Aggregating Unit Test Coverage for All Monorepo’s Packages

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • pedalboard

    A collection of packages to make you software sound better (by mbarzeev)

  • In this post join me as I will be adding an aggregated unit test code coverage report for my Pedalboard monorepo. Monorepos contain many packages, and for each you (should) have tests for and a way to generate a code coverage report from them, but what if you’d like to have a single place where you can see the overall coverage status of the entire monorepo? Let me show you how…

  • lerna

    :dragon: Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.

  • It is a good time to mention that my Pedalboard monorepo uses the Jest testing framework. The first step is to add a script at the root project level, with which I can run my test coverage for all the nested packages. Should be straightforward, using Lerna for that. Here is how my scripts look like now:

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • nyc

    the Istanbul command line interface

  • So let’s see if nyc (the code coverage generator) can help with that. Hmm… this documentation seems interesting! So basically what I understand from it is that I need to collect all the reports from the different packages and then run the nyc report over it. The flow should be like this:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts