UNPKG

2.62 kBJavaScriptView Raw
1/** @license React v0.8.1
2 * jest-react.production.min.js
3 *
4 * Copyright (c) Facebook, Inc. and its affiliates.
5 *
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the root directory of this source tree.
8 */
9
10'use strict';Object.defineProperty(exports,"__esModule",{value:!0});
11var h=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,n=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var c={};for(a=0;10>a;a++)c["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(c).map(function(a){return c[a]}).join(""))return!1;var b={};"abcdefghijklmnopqrst".split("").forEach(function(a){b[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},
12b)).join("")?!1:!0}catch(d){return!1}}()?Object.assign:function(a,c){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var b=Object(a);for(var d,f=1;f<arguments.length;f++){var e=Object(arguments[f]);for(var k in e)l.call(e,k)&&(b[k]=e[k]);if(h){d=h(e);for(var g=0;g<d.length;g++)m.call(e,d[g])&&(b[d[g]]=e[d[g]])}}return b};
13function p(a){for(var c=a.message,b="https://reactjs.org/docs/error-decoder.html?invariant="+c,d=1;d<arguments.length;d++)b+="&args[]="+encodeURIComponent(arguments[d]);a.message="Minified React error #"+c+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ";return a}var q="function"===typeof Symbol&&Symbol.for,r=q?Symbol.for("react.element"):60103,t=q?Symbol.for("react.fragment"):60107;
14function u(a){try{a()}catch(c){return{pass:!1,message:function(){return c.message}}}return{pass:!0}}function v(a){if(null===a||"string"===typeof a)return a;var c=w(a.children);return{$$typeof:r,type:a.type,key:null,ref:null,props:null===c?a.props:n({},a.props,{children:c}),_owner:null,_store:void 0}}
15function w(a){if(null!==a){if(1===a.length)return v(a[0]);if(1<a.length){for(var c=[],b=!0,d="",f=0;f<a.length;f++){var e=v(a[f]);c.push(e);b&&("string"===typeof e?d+=e:null!==e&&(b=!1))}return b?d:c}}return null}
16exports.unstable_toMatchRenderedOutput=function(a,c){if(0!==a._Scheduler.unstable_clearYields().length)throw p(Error(296));a=a.toJSON();if(null===a||"string"===typeof a)var b=a;else Array.isArray(a)?0===a.length?b=null:1===a.length?b=v(a[0]):(a=w(a),b=null===a||"string"===typeof a?a:{$$typeof:r,type:t,key:null,ref:null,props:{children:a},_owner:null,_store:void 0}):b=v(a);return u(function(){expect(b).toEqual(c)})};