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

Lint rule to indicate missing return staement when testing inside promise then or catch block. #41

Closed
tushardhole opened this issue Dec 30, 2017 · 2 comments

Comments

@tushardhole
Copy link
Contributor

tushardhole commented Dec 30, 2017

[PORTING THIS ISSUE FROM JEST REPO]

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
It is mentioned in the jest docs to return a promise when you want to test inside its then or catch block. In case, if a developer misses to add a return statement, then that expectation will not get executed and may result in test which is false positive.

What is the expected behavior?
A lint rule

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
jest: 21.2.1
node: 8.0.0
npm: 5.5.1
OS: Sierra (10.12.6)

@tushardhole
Copy link
Contributor Author

ported this PR for this issue from jest repo.

@SimenB
Copy link
Member

SimenB commented Jan 17, 2018

Fixed in #42

@SimenB SimenB closed this as completed Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants