Skip to content

[prefer-ending-with-expect] false positive when awaiting an expect #1749

@mateusatmckinsey

Description

@mateusatmckinsey

I'm trying to upgrade to v28.13.0, and I have a test case as:

it(`should .....`, async () => { //...... test body await expect(Promise<string>).resolves.toBe(`....`); });

which is breaking.

Image

Is it breaking due to await? Btw, here are the settings for this rule:

'jest/prefer-ending-with-an-expect': [ 'error', { assertFunctionNames: ['expect'], additionalTestBlockFunctions: [], }, ],

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions