Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 737 Bytes

2020-08-22_disallow_large_jest_snapshots_using_eslint.md

File metadata and controls

11 lines (6 loc) · 737 Bytes

Disallow Large Jest Snapshots Using ESLint

08/22/2020

eslint-plugin-jest has a handy rule to limit the size of snapshots - no-large-snapshots. This is especially useful for maintainability of snapshot tests. Snapshots of a large component are cumbersome to maintain as it requires the dev to have a deep knowledge of this components DOM and contained logic.

Github - eslint-plugin-jest/no-large-snapshots

Bonus Round: React Native has updated their documentation and added some great testing guidelines for mobile apps.

Tags: JavaScript, React, React Native, Jest, ESLint