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

gherkin-checker

v1.0.5

Published

Consistency gherkins checker for [nightwatch-cucumber](https://github.com/mucsi96/nightwatch-cucumber) projects.

Downloads

12

Readme

gherkin-checker

npm version travis build

Consistency gherkins checker for nightwatch-cucumber projects.

Given a folder containing gherkin files (.features), a consistency test will check if all the steps used in the gherkins will match in your steps definition file.

How to use

Install the module in your source folder

npm install gherkin-checker --save

and add it to your scripts

"scripts": {
	"gherkin-checker": "gherkin-checker"
}

or install globally

npm install -g gherkin-checker

and in your source folder simply run

gherkin-checker

Configuration

In the folder where you'll run the module create a file named gherkin-checker.conf.js if you want to override the default configs.

//default configurations

module.exports = {
    features_path: "./features",
    steps_path: "./steps/common-steps",
    mode: 'full',
    components: {
        enabled: false,
        components_path: "./components/components",
        excludedComponents: []
    },
    reporter: {
        type: 'light'
    }
}

features_path (string)

The folder containing your gherkin files (.features).

steps_path (string)

The file containing your steps definitions.

mode (string)

Define the test running mode.

  • full: a separate test will be performed for each .feature file in the features_path folder
  • light: a global test will be performed for all .feature files in the features_path folder

components (object)

Additional components configurations.

If you use a module that exports a list of components used for mapping css-selectors with this structure:

// example: components.js

module.exports {
    _components: {
        'component1': 'body',
        'component2': '.container',
        'component3': '.container div',
        'component4': '.footer a.link'
    }
}

and in your gherkin you have something like this:

#gherkin that uses components

Scenario:
	Given I do something
	When I click "component1"
	Then "component2" is displayed

then you should set components.enable = true.

components.enable (bool)

Enable additional components support

components.components_path (string)

The file containing your components definition.

components.excludedComponents (array)

Array of components you want to skip in consistency check.

reporter (object)

Console reporter configurations.

reporter.type (string)

Define the console report style.

  • full: both successful and failed assertions will be shown
  • light: only failed assertions will be shown
credits: the reporter is a custom version of tap-diff

Parameters

you can specify the --path parameter to change the features_path option

Usage: gherkin-checker [options]

Options:

  -h, --help            output usage information
  -V, --version         output the version number
  -p, --path <path>     features folder location (priority over configuration files)
  -m, --mode <value>    (optional) test mode [full|light])
  -r, --report <value>  (optional) report style [full|light])