Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[valid-expect-in-promise] Doesn't work with Promise.finally #740

Closed
mq2thez opened this issue Jan 13, 2021 · 2 comments · Fixed by #914
Closed

[valid-expect-in-promise] Doesn't work with Promise.finally #740

mq2thez opened this issue Jan 13, 2021 · 2 comments · Fixed by #914

Comments

@mq2thez
Copy link

mq2thez commented Jan 13, 2021

Looks like a similar issue was referenced here: #219. In our case, expect in a finally without a return does not cause an ESLint issue.

    describe("making a network call", () => {
        it("Makes the correct call", () => {
            const mySpy = jest.fn();
            const callMySpyAsync = () => Promise.resolve().then(() => mySpy(5678));
            callMySpyAsync(1234).finally(() => {
                expect(mySpy).toHaveBeenCalledWith(1234);
            });
        });
    });
@github-actions
Copy link

🎉 This issue has been resolved in version 24.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This issue has been resolved in version 25.0.0-next.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants