npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

test-coverage-bundle

v1.0.2

Published

It's your go-to buddy for checking out how well your code is covered

Downloads

3

Readme

test-coverage-bundle

Hey there, meet our nifty little test coverage bundle! 🚀 It's your go-to buddy for checking out how well your code is covered. Just toss in a JSON file path, and bam! It'll crunch the numbers and show you how much of your features are cozy under the testing blanket. Perfect for keeping an eye on those UI end-to-end tests, and hey, not just limited to UI!😉🔍

Installation

npm install test-coverage-bundle

Usage

TypeScript

import { calculateUICoverage } from "../src";

calculateUICoverage("./coverage.json");

Considering the provided page mapping: coverage.json. If you haven't specified unique tags for the scenarios, no need to worry – the code takes care of it for you.

[
  {
    "page": "/landing",
    "features": {
      "table view": {
        "Open table view": "@tbl-vw-o-ef5c75d4",
        "Close table view": "@tbl-vw-cls-tbl-vw-818397e3",
        "View table content": "@tbl-vw-vw-tbl-cntnt-21f0400f",
        "Copy table content": "@tbl-vw-cpy-tbl-cntnt-22e5bfde",
        "Download CSV file": "@tbl-vw-dwnld-csv-fl-15717f04",
        "Open additional columns": "@tbl-vw-pn-ddtnl-clmns-08a9628a"
      },
      "periodicity menu": {
        "Default setting": "@prdcty-mn-dflt-sttng-445a8fcf",
        "Select minutes": "@prdcty-mn-slct-mnts-b18ddbc9",
        "Select days": "@prdcty-mn-slct-dys-2ee998c9",
        "Select weeks": "@prdcty-mn-slct-wks-f94b5228",
        "Select months": "@prdcty-mn-slct-mnths-8858db37"
      }
    }
  },
  {
    "page": "/account",
    "features": {
      "email": {
        "Open table view": "@ml-pn-tbl-vw-5c467d57",
        "Close table view": "@ml-cls-tbl-vw-f0088d1b"
      },
      "set new password": {
        "Open table view": "@st-nw-psswrd-pn-tbl-vw-3cd03061",
        "Close table view": "@st-nw-psswrd-cls-tbl-vw-132da7dd"
      }
    }
  }
]

When you toss some new pages into the mix, your console will be buzzing with log outputs, something like this:

Number of Pages: 2
Number of Features: 4
Number of Scenarios: 15
Number of Covered Scenarios: 0
Percentage of Covered Scenarios: 0%
Detailed Coverage Report: [
  {
    "page": "/landing",
    "features": {
      "table view": {
        "Open table view": "non-covered",
        "Close table view": "non-covered",
        "View table content": "non-covered",
        "Copy table content": "non-covered",
        "Download CSV file": "non-covered",
        "Open additional columns": "non-covered"
      },
      "periodicity menu": {
        "Default setting": "non-covered",
        "Select minutes": "non-covered",
        "Select days": "non-covered",
        "Select weeks": "non-covered",
        "Select months": "non-covered"
      }
    }
  },
  {
    "page": "/account",
    "features": {
      "email": {
        "Open table view": "non-covered",
        "Close table view": "non-covered"
      },
      "set new password": {
        "Open table view": "non-covered",
        "Close table view": "non-covered"
      }
    }
  }
]
Overall Uncovered Scenarios:
/landing - table view - Open table view
/landing - table view - Close table view
/landing - table view - View table content
/landing - table view - Copy table content
/landing - table view - Download CSV file
/landing - table view - Open additional columns
/landing - periodicity menu - Default setting
/landing - periodicity menu - Select minutes
/landing - periodicity menu - Select days
/landing - periodicity menu - Select weeks
/landing - periodicity menu - Select months
/account - email - Open table view
/account - email - Close table view
/account - set new password - Open table view
/account - set new password - Close table view

This will churn out identical details in a file labeled coverage_YYYY-MM-DDTHH-MM-SS.SSSZ as well.