RobPethick / jest-theories

A theory library for use with Jest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eslint error when using "plugin:jest/recommended"

JoshWhiteTTD opened this issue · comments

When using "plugin:jest/recommended" I get the following error:

Expect must be inside of a test block. eslint(jest/no-standalone-expect)

image

It would be great to have a corresponding eslint plugin to work with jest-theories

Just dug a little deeper - it looks like this has already been accounted for by jest/recommended.
You can add this rule to your eslint config:

module.exports = {
  // other stuff
  rules: {
     "jest/no-standalone-expect": [
          "error",
          { additionalTestBlockFunctions: ["theoretically"] },
     ],
  }
}

I screwed up the pull request.
It's here: #15