-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: setContext doesn't trigger componentWillReceiveProps #2476
Conversation
@ljharb Here are the sandboxes React 0.14 Sandbox I will continue looking at the issue |
Codecov Report
@@ Coverage Diff @@
## master #2476 +/- ##
==========================================
+ Coverage 96.05% 96.13% +0.07%
==========================================
Files 49 49
Lines 3925 4006 +81
Branches 1102 1123 +21
==========================================
+ Hits 3770 3851 +81
Misses 155 155
Continue to review full report at Codecov.
|
spyMethod, | ||
} from 'enzyme-adapter-utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up adding spyMethod/spyProperty to enzyme-adapter-utils, so that the adapters didn't have to suddenly start requiring enzyme v3.4.0.
- [fix] add missing `enzyme-shallow-equal` (#2476) - [meta] babel: set `transformRuntime` to false - [deps] update `object.assign`, `object.values`, `react-is`, `enzyme-adapter-utils` - [dev deps] update `eslint`, `eslint-config-airbnb`, `eslint-config-airbnb-base`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`, `eslint-plugin-react-hooks`, `babel-plugin-add-module-exports`, `@babel/cli`, `@babel/core`, `@babel/node`, `@babel/register`, `babel-loader`
- [fix] `.setContext()`: calls cWRP (#2476) - [deps] update `object.assign`, `object.values`, `react-is`, `enzyme-adapter-utils` - [dev deps] update `eslint`, `eslint-config-airbnb`, `eslint-config-airbnb-base`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`, `eslint-plugin-react-hooks`, `babel-plugin-add-module-exports`, `@babel/cli`, `@babel/core`, `@babel/node`, `@babel/register`, `babel-loader`
- [fix] `.setContext()`: calls cWRP (#2476) - [deps] update `object.assign`, `object.values`, `enzyme-adapter-utils` - [dev deps] update `eslint`, `eslint-config-airbnb`, `eslint-config-airbnb-base`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`, `eslint-plugin-react-hooks`, `babel-plugin-add-module-exports`, `@babel/cli`, `@babel/core`, `@babel/node`, `@babel/register`, `babel-loader`
- [fix] `.setContext()`: calls cWRP (#2476) - [fix] Ensure recursive calls to `displayNameOfNode` uses the adapter's version of the method (#2482) - [deps] update `object.assign`, `object.values`, `enzyme-adapter-utils` - [dev deps] update `eslint`, `eslint-config-airbnb`, `eslint-config-airbnb-base`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`, `eslint-plugin-react-hooks`, `babel-plugin-add-module-exports`, `@babel/cli`, `@babel/core`, `@babel/node`, `@babel/register`, `babel-loader`
Fixes #2258
Below are two code sandboxes that show the bug exists, i added enzyme to the sandbox when you run the tests sandbox 2 doesn't call the method while sandbox 1 does.