Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 513 Bytes

no-restricted-matchers.md

File metadata and controls

37 lines (24 loc) · 513 Bytes

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

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)