Skip to content

Implementation of to.eventually.be.pending #265

Open
@dhulke

Description

@dhulke

I need to test a promise that should be in a pending state at the moment of the test. I was able to test it doing:

expect(promise).to.eventually.not.be.fulfilled

this expect throws the expected error but it isnt bound to the mochas context so if it fails it won't be reported as a failed test. If I return it or await, the statement will block for 2s and mocha will fail with a timeout, because mocha expects promises to either be resolved or rejected.

Is there any plans to implement something like expect(promise).to.eventually.be.pending?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions