UNPKG

jest-prop-type-throw-error

Version:

this package will help prop type to thrown the error instead of console.warning

7 lines (6 loc) 203 B
const error = console.error; console.error = (message, ...args) => { if (/(Invalid %s|Failed %s type)/gi.test(message)) { expect({'yourError': args}).toBe("Please fix below error"); } };