Skip to content

Support for ctx.todo() #6212

@flowt-au

Description

@flowt-au

Clear and concise description of the problem

I am using vitest-cucumber which is great. An upcoming release will support the Vitest ctx.skip() option by passing the ctx into the test (like Vitest does) like this:

Then(`the result of test "<id>" should be <result>`, (ctx) => {
      ctx.skip()
})

I know in Vitest this is possible: test.todo('unimplemented test') but that can't be done in vitest-cucumber.

Suggested solution

I would love the option of ctx.todo(myMessage) so I can write all the Gherkin, set the tests to have ctx.todo() then have them work like the test.todo('unimplemented test') does, with the addition of an optional custom message.

Then(`the result of test "<id>" should be <result>`, (ctx) => {
      ctx.todo('Waiting for the client to ok this idea')
})

I think this would be of use to non-BDD testers too.

Alternative

No response

Additional context

Anyway, thanks for a great library!
Murray

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Approved

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions