mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 00:20:28 +01:00
Shallow renderer and test utils bundles Adds new bundles introduced with React 15.5 release to master (and 16 alpha) react-dom/test-utils: This new bundle contains what used to be react-addons-test-utils. This bundle shares things from react-dom rather than duplicates them. A temporary createRenderer method has been left behind as a way to access the new shallow renderer. This is for the ReactNative release cycle only and should be going away before the final release. react-test-renderer/shallow: This new shallow renderer is almost entirely stand-alone (in that it doesn't use the React reconciler or scheduler). The only touch points are ReactElement and prop/context validation. This renderer is stack and fiber compatible.
8 lines
220 B
JavaScript
8 lines
220 B
JavaScript
'use strict';
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
throw Error('shallow renderer is not available in production mode.');
|
|
} else {
|
|
module.exports = require('./cjs/react-test-renderer-shallow.development');
|
|
}
|