我jest v24.7.1
在我的项目中安装了:
npm install jest -D
然后我开始写一些测试文件,但是我得到了这些 eslint 错误:
'describe' is not defined. eslint (no-undef)
'it' is not defined. eslint (no-undef)
'expect' is not defined. eslint (no-undef)
eslintrc.js:
module.exports = {
env: {
browser: true,
es6: true
},
extends: ["airbnb", "prettier", "prettier/react"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly"
},
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: "module"
},
plugins: ["react"],
rules: {}
};
我应该添加另一个规则或插件来解决这个问题吗?