New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-prop-type-error

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-prop-type-error - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

.github/ISSUE_TEMPLATE/Bug_report.md

8

index.js

@@ -1,9 +0,9 @@

const originalConsoleError = console.error;
const error = console.error;
console.error = message => {
if (/(Failed prop type)/.test(message)) {
console.error = (message, ...args) => {
if (/(Invalid prop|Failed prop type)/gi.test(message)) {
throw new Error(message);
}
originalConsoleError(message);
error.apply(console, [message, ...args]);
};
{
"name": "jest-prop-type-error",
"description": "Makes Jest throw on React prop-type failures",
"version": "1.0.0",
"version": "1.1.0",
"main": "index.js",

@@ -6,0 +6,0 @@ "author": "Espen Henriksen",

@@ -14,3 +14,5 @@ # jest-prop-type-error

whenever a wrong prop is passed to a component, the prop-type validation would
pick this up and fail the test. Then we would be able to
pick this up and fail the test. Then we would be able to verify that the props
that are passed to our components are good compile-time, provided the tests
run when we build our production bundle.

@@ -45,5 +47,5 @@ That is what this library does!

[pt]: https://facebook.github.io/react/docs/typechecking-with-proptypes.html
[blog]:
[blog]: https://medium.com/shark-bytes/type-checking-with-prop-types-in-jest-e0cd0dc92d5
[react]: https://reactjs.org/
[jest]: https://facebook.github.io/jest/
[stian]: https://twitter.com/stipsan
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc