This little library improves support for accessory types in Jest by failing accessory type bug tests instead of ignoring them.
Every time the test runs and every time a faulty accessory is sent to your component, the accessory type validation will detect it and cause the test to fail.
npm install --save-dev jest-prop-types
To catch accessory errors and Jest fail the test, you need to add the following to your jest.config.js
file.
{
"setupFiles": [
"jest-prop-types"
]
}
Create React App does not allow the use of setupFiles
, instead add jest-prop-types
to your setupTests.js
file.
import 'jest-prop-types'
Read the contributing guide to learn about our development process, how to propose bugfixes and improvements.
To see what has changed visit our CHANGELOG.md.
This project is licensed under the terms of the MIT license.