Skip to content

Commit

Permalink
Fix old gDSFP test of shallowWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
chenesan committed Feb 28, 2019
1 parent cffd5b0 commit 552714e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Expand Up @@ -6011,7 +6011,14 @@ describe('shallow', () => {
prevContext,
nextContext,
};
// In shallow wrapper we try to fix a React shallow renderer bug (facebook/react#14607, fixed in react 16.8).
// so we have to call gDSFP before shallow renderer rendering to set correct instance state in sCU
// which will cause gDSFP called twice in this tests
expect(spy.args).to.deep.equal([
['getDerivedStateFromProps', {
props: nextProps,
state: nextState,
}],
['getDerivedStateFromProps', {
props: nextProps,
state: nextState,
Expand Down

0 comments on commit 552714e

Please sign in to comment.