{"version":3,"sources":["../src/EnzymeAdapter.js"],"names":["unimplementedError","methodName","classname","Error","EnzymeAdapter","options","node","matchingType","type","element","props","instance","callback","call","MODES","STRING","MOUNT","SHALLOW","module","exports"],"mappings":";;;;;;AAAA,SAASA,kBAAT,CAA4BC,UAA5B,EAAwCC,SAAxC,EAAmD;AACjD,SAAO,IAAIC,KAAJ,QAAaF,UAAb,yCAAmDC,SAAnD,iCAAP;AACD;;IAEKE,a;AACJ,2BAAc;AAAA;;AACZ,SAAKC,OAAL,GAAe,EAAf;AACD;;AAED;AACA;AACA;;;;;;8BACeA,O,EAAS;AACtB,cAAML,mBAAmB,gBAAnB,EAAqC,eAArC,CAAN;AACD;;;;;AAED;AACA;AACA;AACA;;;;;6BACcM,I,EAAM;AAClB,cAAMN,mBAAmB,eAAnB,EAAoC,eAApC,CAAN;AACD;;;;;AAED;;;;;kCACmBM,I,EAAMC,Y,EAAc;AACrC,YAAI,CAACD,IAAL,EAAW;AACT,iBAAOA,IAAP;AACD;AAHoC,YAI7BE,IAJ6B,GAIpBF,IAJoB,CAI7BE,IAJ6B;;AAKrC,eAAOA,SAASD,YAAhB;AACD;;;;;AAED;;;;;8BACeE,O,EAAS;AACtB,cAAMT,mBAAmB,gBAAnB,EAAqC,eAArC,CAAN;AACD;;;;;AAED;;;;;6BACcQ,I,EAAME,K,EAAoB;AACtC,cAAMV,mBAAmB,eAAnB,EAAoC,eAApC,CAAN;AACD;;;;;AAED;;;;;sCACuBW,Q,EAAUC,Q,EAAU;AACzCA,iBAASC,IAAT,CAAcF,QAAd;AACD;;;;;;;;;AAGHP,cAAcU,KAAd,GAAsB;AACpBC,UAAQ,QADY;AAEpBC,SAAO,OAFa;AAGpBC,WAAS;AAHW,CAAtB;;AAMAC,OAAOC,OAAP,GAAiBf,aAAjB","file":"EnzymeAdapter.js","sourcesContent":["function unimplementedError(methodName, classname) {\n return new Error(`${methodName} is a required method of ${classname}, but was not implemented.`);\n}\n\nclass EnzymeAdapter {\n constructor() {\n this.options = {};\n }\n\n // Provided a bag of options, return an `EnzymeRenderer`. Some options can be implementation\n // specific, like `attach` etc. for React, but not part of this interface explicitly.\n // eslint-disable-next-line class-methods-use-this, no-unused-vars\n createRenderer(options) {\n throw unimplementedError('createRenderer', 'EnzymeAdapter');\n }\n\n // converts an RSTNode to the corresponding JSX Pragma Element. This will be needed\n // in order to implement the `Wrapper.mount()` and `Wrapper.shallow()` methods, but should\n // be pretty straightforward for people to implement.\n // eslint-disable-next-line class-methods-use-this, no-unused-vars\n nodeToElement(node) {\n throw unimplementedError('nodeToElement', 'EnzymeAdapter');\n }\n\n // eslint-disable-next-line class-methods-use-this\n matchesElementType(node, matchingType) {\n if (!node) {\n return node;\n }\n const { type } = node;\n return type === matchingType;\n }\n\n // eslint-disable-next-line class-methods-use-this, no-unused-vars\n isValidElement(element) {\n throw unimplementedError('isValidElement', 'EnzymeAdapter');\n }\n\n // eslint-disable-next-line class-methods-use-this, no-unused-vars\n createElement(type, props, ...children) {\n throw unimplementedError('createElement', 'EnzymeAdapter');\n }\n\n // eslint-disable-next-line class-methods-use-this\n invokeSetStateCallback(instance, callback) {\n callback.call(instance);\n }\n}\n\nEnzymeAdapter.MODES = {\n STRING: 'string',\n MOUNT: 'mount',\n SHALLOW: 'shallow',\n};\n\nmodule.exports = EnzymeAdapter;\n"]}