JSPM

cucumberjs-step-usages

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q19491F
  • License Apache-2.0

Monkey patch CucumberJS v1 to notify which step functions are not used.

Package Exports

  • cucumberjs-step-usages

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cucumberjs-step-usages) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Cucumber.js Step Usages

This small node module helps you find:

  1. Steps that are defined but not utilized
  2. How many times a step is utilized

Installation

This is intended to work with cucumber-js version 1.x only.

First, install the module as a dev dependency:

npm install --save-dev cucumberjs-step-usages

Next, import / require the module and call the desired report. For example, this file features/step_definitions/hooks.js:

const cucumberJsStepUsages = require("cucumberjs-step-usages");
module.exports = function () {
    this.setDefaultTimeout(60000);
    
    cucumberJsStepUsages.findUnusedSteps(this);

    // Other setup things that you want to do goes here
};

Find step usages

You can find steps usages fast by running Cucumberjs in dry-run mode. For example: cucumber.js --dry-run ./features.