yarn run v1.7.0 $ /Users/jeremysu/Documents/Projects/express-test/node_modules/.bin/eslint test/routes
/Users/jeremysu/Documents/Projects/express-test/test/routes/index.test.js 4:1 error 'describe' is not defined no-undef 5:3 error 'it' is not defined no-undef 12:1 error 'describe' is not defined no-undef 13:3 error 'it' is not defined no-undef ✖ 4 problems (4 errors, 0 warnings)
error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
no-undef 問題
no-undef 這個錯誤代表說,ESLint 不允許使用未宣告的參數,以避免錯誤,詳細內容參考這裡,可是在測試中,預設就是用 describe 與 it 來做宣告,這樣要如何解決問題呢?