var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=render;var _objectSpread2=_interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));var React=_interopRequireWildcard(require("react"));var _reactTestRenderer=_interopRequireDefault(require("react-test-renderer"));var _getByAPI=require("./helpers/getByAPI");var _queryByAPI=require("./helpers/queryByAPI");var _debugShallow=_interopRequireDefault(require("./helpers/debugShallow"));var _debugDeep=_interopRequireDefault(require("./helpers/debugDeep"));function render(component,options){var renderer=_reactTestRenderer.default.create(component,options);var instance=renderer.root;return(0,_objectSpread2.default)({},(0,_getByAPI.getByAPI)(instance),(0,_queryByAPI.queryByAPI)(instance),{update:renderer.update,unmount:renderer.unmount,toJSON:renderer.toJSON,debug:debug(instance,renderer)});}function debug(instance,renderer){function debugImpl(message){return(0,_debugDeep.default)(renderer.toJSON(),message);}debugImpl.shallow=function(message){return(0,_debugShallow.default)(instance,message);};return debugImpl;}