We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related to #5292, see https://github.com/bmullan91/react-shallow-renderer-bug for my test case and how to reproduce.
git clone https://github.com/bmullan91/react-shallow-renderer-bug.git cd react-shallow-renderer-bug npm install npm test
The StatelessComponent and StatefulComponent when rendered with shallowRenderer, there outputs differ in the _owner key, see below.
StatelessComponent
StatefulComponent
_owner
TAP version 13 # compare StatelessComponent shallowRenderer getRenderOutput not ok 1 should be equivalent --- operator: deepEqual expected: |- { $$typeof: 60103, _owner: null, _store: {}, key: null, props: { children: [ 'Hello ', 'Brian' ] }, ref: null, type: 'div' } actual: |- { $$typeof: 60103, _owner: { _context: {}, _currentElement: { $$typeof: 60103, _owner: null, _store: {}, key: null, props: { name: 'Brian' }, ref: null, type: [Function] }, _instance: { _reactInternalInstance: [Circular], context: {}, props: { name: 'Brian' }, refs: {}, state: null, updater: { enqueueCallback: [Function], enqueueCallbackInternal: [Function], enqueueElementInternal: [Function], enqueueForceUpdate: [Function], enqueueReplaceProps: [Function], enqueueReplacePropsInternal: [Function], enqueueReplaceState: [Function], enqueueSetProps: [Function], enqueueSetPropsInternal: [Function], enqueueSetState: [Function], isMounted: [Function] } }, _mountOrder: 1, _pendingCallbacks: null, _pendingElement: null, _pendingForceUpdate: false, _pendingReplaceState: false, _pendingStateQueue: null, _renderedComponent: { _currentElement: [Circular], _renderedOutput: [Circular] }, _rootNodeID: '.13qyw11le68', _topLevelWrapper: null }, _store: {}, key: null, props: { children: [ 'Hello ', 'Brian' ] }, ref: null, type: 'div' } at: Test.<anonymous> (/Users/brianmullan/workspace/react-shallow-renderer-bug/index.js:25:5) ... # compare StatefulComponent shallowRenderer getRenderOutput ok 2 should be equivalent 1..2 # tests 2 # pass 1 # fail 1
The text was updated successfully, but these errors were encountered:
This was fixed in #6362.
Sorry, something went wrong.
No branches or pull requests
Related to #5292, see https://github.com/bmullan91/react-shallow-renderer-bug for my test case and how to reproduce.
reproduce
issue
The
StatelessComponent
andStatefulComponent
when rendered with shallowRenderer, there outputs differ in the_owner
key, see below.test output
The text was updated successfully, but these errors were encountered: