gpc-step-groups
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    gpc-step-groups

    Downloads Version@npm Version@git CI Docs

    The StepGroups precompiler is responsible for correcting the gherkin keywords of steps to make the tests more readable.

    Example

    Given the page is opened
    Given the settings are deleted
    When the settings menu item is clicked
    When the advanced settings link is clicked
    Then the advanced settings should be loaded
    Then the basic settings link should be visible

    It will be modified to:

    Given the page is opened
    And the settings are deleted
    When the settings menu item is clicked
    And the advanced settings link is clicked
    Then the advanced settings should be loaded
    And the basic settings link should be visible

    Usage

    'use strict';
    const compiler = require('gherking');
    const StepGroups = require('step-groups');
    
    let ast = await compiler.load('./features/src/login.feature');
    ast = compiler.process(
        ast,
        new StepGroups({
            // config
        })
    );
    await compiler.save('./features/dist/login.feature', ast, {
        lineBreak: '\r\n'
    });
    'use strict';
    import {load, process, save} from "gherking";
    import Template = require("step-groups");
    
    let ast = await load("./features/src/login.feature");
    ast = process(
        ast,
        new Template({
            // config
        })
    );
    await save('./features/dist/login.feature', ast, {
        lineBreak: '\r\n'
    });

    Other

    This package uses debug for logging, use gpc:step-groups :

    DEBUG=gpc:step-groups* gherking ...

    For detailed documentation see the TypeDocs documentation.

    Install

    npm i gpc-step-groups

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.07 kB

    Total Files

    5

    Last publish

    Collaborators

    • monikalaszlo
    • rakur
    • wgula
    • szikszail
    • judit-nahaj
    • sorosz89