react/packages/react-test-renderer/shallow.js
Brian Vaughn 66f2097f33 Shallow renderer and test utils bundles (#9426)
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.
2017-04-19 16:45:31 -07:00

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');
}