Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 463 Bytes

README.md

File metadata and controls

20 lines (16 loc) · 463 Bytes

eslint-plugin-snapshots

Avoid testing functionality using toMatchSnapshot().

If you are using @testing/library there is a handy package called jest-dom where there are nifty jest matchers, for example toHaveStyle()

Usage

Add no-snapshots to your section of .eslintrc

{
  "plugins": ["no-snapshots"]
}

Then add the rule .eslinrc

{
  "rules": ["no-snapshots/snapshots": "error"]
}