Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 578 Bytes

File metadata and controls

38 lines (26 loc) · 578 Bytes

vitest/no-restricted-matchers

📝 Disallow the use of certain matchers.

⚠️ This rule warns in the 🌐 all config.

Rule Details

This rule disallows the use of certain matchers.

For Example

Options

{
  "vitest/no-restricted-matchers": [
    "error",
    {
      "not": null
    }
  ]
}

Examples of incorrect code for this rule with the above configuration

expect(a).not.toBe(b)

Examples of correct code for this rule with the above configuration

expect(a).toBe(b)