Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 564 Bytes

no-restricted-matchers.md

File metadata and controls

38 lines (25 loc) · 564 Bytes

Disallow the use of certain matchers (vitest/no-restricted-matchers)

⚠️ This rule warns in the 🌐 all config.

Rule Details

This rule disallows the use of certain matchers.

Forexample

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)