Skip to content

feat: create new prefer-ending-with-an-expect rule #1742

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented May 29, 2025

I decided it would be best to have this as a new rule rather than part of expect-expect so that you can inline disable it without also losing out on the rest of expect-expect for the test.

While I cribbed this from expect-expect, I have purposely left out things like handling if a function reference is passed in or if a promise is returned - support for those can be added as a follow up.

Resolves #1338

@G-Rath G-Rath force-pushed the require-ending-with-expect branch from bf39075 to 5e85fbd Compare May 29, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[expect-expect] Option to enforce the last statement of a test to be an assertion
1 participant