Skip to content

Feature Requests: autoBindSteps should propose suitable code #167

Description

@drpicox

Currently, when we are using autoBindSteps, when a step is failing the output looks like:

    Scenario "List products with no products" has 2 step(s) in the feature file, but 0 step definition(s) defined. Try adding the following code:

    test('List products with no products', ({ when, then }) => {
    	when('I list products', () => {

    	});

    	then(/^there should be (\d+) products$/, (arg0) => {

    	});
    });

But when we are using autoBindSteps, we are not using jest test directly, so the suggestion is confusing.
It should be nice to change the message to something like:

    Scenario "List products with no products" has 2 step(s) in the feature file, but 0 step definition(s) defined. Try adding the following code:

    const listProductsWithNoProductsStep = ({ when, then }) => {
    	when('I list products', () => {

    	});

    	then(/^there should be (\d+) products$/, (arg0) => {

    	});
    });

Thanks and awesome job!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions