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

Bug: jest/no-standalone-expect does not recognise when it (or test) is assigned to a variable #551

Closed
wheresrhys opened this issue Mar 26, 2020 · 1 comment · Fixed by #585
Labels

Comments

@wheresrhys
Copy link

Reduced test case

describe('scenario', () => {
  const t = Math.random() ? it.only : it;
  t('testing', () => expect(true))
})

Produces the linting error:

error  Expect must be inside of a test block   jest/no-standalone-expect
@github-actions
Copy link

🎉 This issue has been resolved in version 23.15.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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant