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

grunt-behat-wrapper

v0.0.2

Published

Wrapper around the `behat` CLI tool.

Downloads

4

Readme

grunt-behat-wrapper

Build status

Build Status: Linux

Install

Install with npm

npm install grunt-behat-wrapper --save-dev

Tasks

behat-definitions

Wrapper around the behat --definitions foo command.

Print all available step definitions:

  • use --definitions l to just list definition expressions.
  • use --definitions i to show definitions with extended info.
  • use --definitions 'needle' to find specific definitions.

Use --lang to see definitions in specific language.

Configuration

With the default options the

grunt behat-definitions

is equivalent to

./bin/behat --definitions l

behat-story-syntax

Wrapper around the behat --story-syntax command.

Print *.feature example. Use --lang to see specific language.

Configuration

With the default options the

grunt behat-story-syntax

is equivalent to

./bin/behat --story-syntax

behat-config-reference

Wrapper around the behat --config-reference command.

Display the configuration reference.

Configuration

With the default options the

grunt behat-config-reference

is equivalent to

./bin/behat --config-reference

behat-run

Wrapper around the behat command.

Run tests.

Configuration

With the default options the

grunt behat-run

is equivalent to

./bin/behat

behat-rerun

Wrapper around the behat --rerun command.

Re-run scenarios that failed during last execution.

Configuration

With the default options the

grunt behat-rerun

is equivalent to

./bin/behat --rerun

Configuration

options.behatExecutable

Type: String

Default value: './bin/behat'

Path to behat executable.

options.args

Type: Object

Default value: {}

Key-value. The keys are almost the same as in the options in the CLI.

options.args.suite

Type: String

Default value: null

Only execute a specific suite.

options.args.format

Type: String

Default value: null

How to format tests output. pretty is default.

Available formats are:

  • progress: Prints one character per step.
  • pretty: Prints the feature as is.

You can use multiple formats at the same time. (multiple values allowed)

options.args.out

Type: String

Default value: null

Write format output to a file/directory instead of STDOUT (output_path). You can also provide different outputs to multiple formats. (multiple values allowed)

options.args.formatSettings

Type: String

Default value: null

@todo Set formatters parameters using json object. Keys are parameter names, values are values. (multiple values allowed)

options.args.lang

Type: String

Default value: null

Only executeCall the feature elements which match part of the given name or regex. (multiple values allowed)

options.args.tags

Type: String

Default value: null

Only executeCall the features or scenarios with tags matching tag filter expression. (multiple values allowed)

options.args.definitions

Type: String

Default value: 'l'

options.args.appendSnippets

Type: Boolean

Default value: false

Appends snippets for undefined steps into main context.

options.args.noSnippets

Type: Boolean

Default value: false

Do not print snippets for undefined steps after stats.

options.args.strict

Type: Boolean

Default value: true

Passes only if all tests are explicitly passing.

options.args.stopOnFailure

Type: Boolean

Default value: true

Stop processing on first failed scenario.

options.args.profile

Type: String

Default value: null

Specify config profile to use.

options.args.config

Type: String

Default value: null

Specify config file to use.

options.args.verbose

Type: Boolean

Default value: false

options.args.noInteraction

Type: Boolean

Default value: false

Do not ask any interactive question.

options.args.colors

Type: TriState

Default value: null

If true then force ANSI color in the output. By default color support is guessed based on your platform and the output if not specified.

If false then force no ANSI color in the output.

paths

Type: String[]

Default value: []

Optional path(s) to execute. Could be:

  • a dir (features/)
  • a feature (*.feature)
  • a scenario at specific line (*.feature:10).
  • all scenarios at or after a specific line (.feature:10-).
  • all scenarios at a line within a specific range (*.feature:10-20).
  • a scenarios list file (*.scenarios).

Flags

You can modify the arguments by Flags

Flag colors

Override the value of options.args.colors argument with true.

Flag no-colors

Override the value of options.args.colors argument with false.

Flag no-interaction

Override the value of options.args.noInteraction argument with true.

Flag verbose

Override the value of options.args.verbose argument with true.

Flag dryRun

Override the value of options.args.dryRun argument with true.

Flag strict

Override the value of options.args.strict argument with true.

Flag pretty

Override the value of options.args.format argument with 'pretty'.

Flag progress

Override the value of options.args.format argument with 'progress'.

Examples

Basic

require('jit-grunt')(
  grunt,
  // Mapping.
  {
    'behat-definitions': 'grunt-behat-wrapper',
    'behat-story-syntax': 'grunt-behat-wrapper',
    'behat-config-reference': 'grunt-behat-wrapper',
    'behat-run': 'grunt-behat-wrapper',
    'behat-rerun': 'grunt-behat-wrapper'
  }
);

grunt.config.init({
  'behat-definitions': {
    main: {}
  },
  'behat-story-syntax': {
    main: {}
  },
  'behat-config-reference': {
    main: {}
  },
  'behat-run': {
    main: {}
  },
  'behat-rerun': {
    main: {}
  }
});

Author

Andor Dávid

Release History

  • v0.0.2 - 2015-06-28
    • Add dynamic flag support for --lang, --definitions and --profile.
    • Fix "files" vs "paths" documentation bug.
  • v0.0.1 - 2015-06-27
    • Initial release with basic functions.

License

Copyright (c) 2015 Andor Dávid, contributors.