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

feature-map

v1.0.0

Published

A Tool to manually track the automation coverage progress of features within a project

Downloads

5,973

Readme

feature-map

This is a bare bones test coverage feature map library. It will take a yaml file path as an input and calculate the coverage of the features in the file. This is useful for tracking coverage for UI E2E tests.

Installation

npm install feature-map

Usage

JavaScript

const calculateYamlCoverage = require('feature-map');

calculateYamlCoverage('./featureMap.yml');

TypeScript

import {calculateYamlCoverage} from '../src';

calculateYamlCoverage('./test/testCoverage.yml');

Given the following feature map: featureMap.yml. NOTE: it is important to note that page: and features: are required keys. Currently the library does not support keys that differ from features:. Later down the road I could see adding scenarios: or tests: as a key for similar calculations.

- page: '/auth/login'
  features:
    sign in with google: false
    email: true
    password: true
    login: true
    register your account: false
    forgot password: false
- page: '/auth/forgot-password'
  features:
    email: false
    set new password: false
- page: '/auth/register'
  features:
    first name: false
    last name: false
    date of birth: false
    address: false
    postcode: false
    city: false
    state: false
    country: false
    phone rate: false
    e-mail address: false
    password: false
    register button: false
- page: '/category/hand-tools'
  features:
    header: true
    sidebar:
      sort: false
      filters: false
      by brand: false
    product card:
      image: false
      image zoom: false
      title: false
      price: false
    pagination:
      previous: false
      next: false
      number: false
- page: '/product/{id}'
  features:
    header: false
    product details:
      image: false
      title: false
      tags: false
      price: false
      description: false
      quantity: false
      add to cart: false
      add to favorites: false
    related products:
      image: false
      title: false
      more information: false
    footer: false

When adding to your codebase you will get console.log() output like this:

/auth/login page has 50% coverage
/auth/forgot-password page has 0% coverage
/auth/register page has 0% coverage
/category/hand-tools page has 9.09% coverage
/product/{id} page has 0% coverage

Total Product coverage is: 64.79%

This will also generate the same details in a file named coverage-output.txt