# cucumberjs-step-usages

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

Latest version **0.1.1** (published 2018-12-29) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install cucumberjs-step-usages
pnpm add cucumberjs-step-usages
yarn add cucumberjs-step-usages
bun add cucumberjs-step-usages
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2018-12-29 |
| First published | 2018-12-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 44.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ash Lux |
| Maintainers | ashlux |
| Keywords | cucumber, cucumberjs, cucumber js, cucumber-js, cuke, usage, unused, steps |

## Links

- npm: https://www.npmjs.com/package/cucumberjs-step-usages
- Repository: https://github.com/ashlux/cucumberjs-step-usages
- Homepage: https://github.com/ashlux/cucumberjs-step-usages#readme
- Issues: https://github.com/ashlux/cucumberjs-step-usages/issues
- npm.io page: https://npm.io/package/cucumberjs-step-usages

## Dependencies (2)

- [colors](https://npm.io/package/colors.md) ^1.3.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.2

## Recent versions

- 0.1.1 (latest) — 2018-12-29
- 0.1.0 — 2018-12-28
- 0.0.0 — 2018-12-28

## README

# Cucumber.js Step Usages

This small node module helps you find:

1. Steps that are defined but not utilized
1. How many times a step is utilized (planned?)

Example output when finding steps that are defined but not utilized:

![image](example-output.png)

## Installation

> This is intended to work with [cucumber-js version 1.x only](https://github.com/cucumber/cucumber-js/tree/1.x).

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`:

```javascript 1.8
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`.

---
_Source: https://npm.io/package/cucumberjs-step-usages · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
