Nice way to get rid of no-unused-expressions linter error with chai

后端 未结 6 1781
长发绾君心
长发绾君心 2020-12-09 07:12

In my Chai tests I often find myself wanting to use their assertions that are something like .to.be.empty, .to.be.true e.t.c., because I find them

6条回答
  •  隐瞒了意图╮
    2020-12-09 08:04

    Just found another option using Relative Glob Patterns:

    In your .eslintrc file:

    overrides: [
        {
            files: "*.test.js",
            rules: {
                "no-unused-expressions": "off"
            }
        }
    ]
    

提交回复
热议问题