How to use ESLint with Jest

后端 未结 9 1666
滥情空心
滥情空心 2020-12-07 11:56

I\'m attempting to use the ESLint linter with the Jest testing framework.

Jest tests run with some globals like jest, which I\'ll need to tell the lin

9条回答
  •  有刺的猬
    2020-12-07 12:16

    You can also set the test env in your test file as follows:

    /* eslint-env jest */
    
    describe(() => {
      /* ... */
    })
    

提交回复
热议问题