Skip to content

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
@G-Rath G-Rath merged commit fe1349b into main Jun 6, 2025
100 of 101 checks passed
@G-Rath G-Rath deleted the require-ending-with-expect branch June 6, 2025 21:08
github-actions bot pushed a commit that referenced this pull request Jun 6, 2025
# [28.13.0](v28.12.0...v28.13.0) (2025-06-06)

### Features

* create new `prefer-ending-with-an-expect` rule ([#1742](#1742)) ([fe1349b](fe1349b))
Copy link

github-actions bot commented Jun 6, 2025

🎉 This PR is included in version 28.13.0 🎉

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 this pull request may close these issues.

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

1 participant