Skip to content

valid-expect does not work with then #347

@glickel

Description

@glickel

Hello, I have a problem with jest/valid-expect rule, it seems to not work when I put a .then after a .rejects or a .resolves like this:

return expect(functionReturningAPromise()).resolves.toEqual(1).then(() => {
    expect(someMock).toHaveBeenCalledTimes(1);
});

When I disable the rule jest/valid-expect or I remove the .then it works well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions