From 673f514f810e91faf5bc3a35b07f1d397899dfc4 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Thu, 2 Mar 2017 16:12:50 -0800 Subject: [PATCH] Fix PropTypes production test so it works with error code system --- scripts/error-codes/codes.json | 3 ++- .../classic/types/__tests__/ReactPropTypesProduction-test.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json index e4662c0912..fb8006fdf2 100644 --- a/scripts/error-codes/codes.json +++ b/scripts/error-codes/codes.json @@ -142,5 +142,6 @@ "140": "Expected hook events to fire for the child before its parent includes it in onSetChildren().", "141": "Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().", "142": "Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).", - "143": "React.Children.only expected to receive a single React element child." + "143": "React.Children.only expected to receive a single React element child.", + "144": "React.PropTypes type checking code is stripped in production." } diff --git a/src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js b/src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js index 07a46a8774..67842710e4 100644 --- a/src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js +++ b/src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js @@ -49,7 +49,7 @@ describe('ReactPropTypesProduction', function() { 'prop' ); }).toThrowError( - 'React.PropTypes type checking code is stripped in production.' + 'Minified React error #144' ); }