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AAO,EAAc,GAEzB,CAEA,OAAO,QAAU,CAChB,gCAGA,2BAAA,CAA6B,GAC5B,OAAO,4BAA4B,KAAM,KAAM,EAChD,EAEA,qBAAA,CAAuB,GACtB,OAAO,sBAAsB,KAAM,KAAM,EAC1C,EAEA,wBAAA,CAA0B,GACzB,OAAO,yBAAyB,KAAM,KAAM,EAC7C,EAEA,yBAAA,CAA2B,EAAS,GACnC,OAAO,0BAA0B,KAAM,KAAM,EAAS,CAAE,YACzD,EAEA,6BAAA,CAA+B,EAAS,EAAU,GACjD,OAAO,0BAA0B,KAAM,KAAM,EAAS,CAAE,WAAU,cAAa,SAAU,QAC1F","file":"/npm/@lexa79/jest-matchers@1.0.7/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@lexa79/jest-matchers@1.0.7/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * Copyright (c) 2019 <alexander.urban@cygni.se>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nconst fs = require( \"fs\" );\nconst path = require( \"path\" );\n\nconst toDiffableHtml = require( \"diffable-html\" );\n\nlet globalRenderHook = null;\n\n/**\n * Initialise matchers with valid renderer (e.g. ReactDOMServer)\n * so that a given React component can be automatically rendered into HTML code.\n *\n * @param\t{object|function}\trenderer\n *\t\tInstance of ReactDOMServer, so that function renderToString() can be accessed; or\n *\t\tInstance of enzyme, so that function shallow() can be accessed; or\n *\t\tCallback function which takes a React component and returns its HTML code.\n */\nfunction connectRenderer( renderer ) {\n\tif ( renderer == null ) {\n\t\treturn;\n\t}\n\n\tswitch ( typeof renderer ) {\n\tcase \"object\":\n\t\tif ( typeof renderer.renderToString === \"function\" ) {\n\t\t\tglobalRenderHook = renderer.renderToString;\n\t\t}\n\t\tif ( typeof renderer.shallow === \"function\" ) {\n\t\t\tglobalRenderHook = component => renderer.shallow( component ).html();\n\t\t}\n\t\tbreak;\n\n\tcase \"function\":\n\t\tglobalRenderHook = renderer;\n\t\tbreak;\n\n\tdefault:\n\t\tthrow new Error( \"Can't use given renderer - invalid type\" );\n\t}\n}\n\n/**\n * Ensures that the given callback crashs.\n * Any output produced with console.error() is suppressed.\n *\n * Negation behaves like a \"toSucceedWithSuppressedOutput\":\n * Ensures that the given callback doesn't crash.\n * Any output produced with console.error() is suppressed.\n *\n * @param\t{function} \tcallback\n *\t\tCallback function which shall be checked\n *\n * @returns\t{object}\n *\t\tDescription of the test result in the form { message: ..., pass: ... }\n */\nfunction toThrowWithSuppressedOutput( callback ) {\n\tlet hasThrown = false;\n\n\t/* eslint-disable no-console */\n\tconst originalConsole = console.error;\n\tconsole.error = () => null;\n\n\ttry {\n\t\tcallback.call();\n\t} catch ( error ) {\n\t\thasThrown = true;\n\t}\n\n\tconsole.error = originalConsole;\n\t/* eslint-enable no-console */\n\n\treturn {\n\t\tmessage: () => `expected callback \"${callback.toString()}\" to ${hasThrown ? \"succeed\" : \"fail\"}`,\n\t\tpass:    hasThrown,\n\t};\n}\n\n/**\n * Ensures that the given callback doesn't crash\n * and that in the same time some output is produced with console.error().\n *\n * Negation:\n * Ensures that the callback crashs or\n * at least doesn't generate any output with console.error().\n *\n * @param\t{function}\tcallback\n *\t\tCallback function which shall be checked\n *\n * @returns\t{object}\n *\t\tDescription of the test result in the form { message: ..., pass: ... }\n */\nfunction toSucceedWithMessages( callback ) {\n\tlet hasThrown = false;\n\tconst output = [];\n\n\t/* eslint-disable no-console */\n\tconst originalConsole = console.error;\n\tconsole.error = ( ...msg ) => Array.prototype.push.apply( output, msg ) && null;\n\n\ttry {\n\t\tcallback.call();\n\t} catch ( error ) {\n\t\thasThrown = true;\n\t}\n\n\tconsole.error = originalConsole;\n\t/* eslint-enable no-console */\n\n\tconst pass = !hasThrown && output.length > 0;\n\n\treturn {\n\t\tmessage: () => {\n\t\t\tif ( pass ) {\n\t\t\t\treturn `Expected callback \"${callback.toString()}\" to fail or at least not produce any output`;\n\t\t\t}\n\t\t\tif ( hasThrown ) {\n\t\t\t\treturn `Expected callback \"${callback.toString()}\" to succeed, `\n\t\t\t\t+ `but it failed with those errors:\\n${output.join( \"\\n\" )}\\n`;\n\t\t\t}\n\t\t\treturn `Expected callback \"${callback.toString()}\" to produce some output`;\n\t\t},\n\t\tpass,\n\t};\n}\n\n/**\n * Ensures that the given callback doesn't crash\n * and doesn't produce any output with console.error().\n *\n * Negation:\n * Ensures that the callback crashs or\n * at least produces some output with console.error().\n *\n * @param\t{function}\tcallback\n *\t\tCallback function which shall be checked\n *\n * @returns\t{object}\n *\t\tDescription of the test result in the form { message: ..., pass: ... }\n */\nfunction toSucceedWithoutMessages( callback ) {\n\tlet hasThrown = false;\n\tconst output = [];\n\n\t/* eslint-disable no-console */\n\tconst originalConsole = console.error;\n\tconsole.error = ( ...msg ) => Array.prototype.push.apply( output, msg ) && null;\n\n\ttry {\n\t\tcallback.call();\n\t} catch ( error ) {\n\t\thasThrown = true;\n\t}\n\n\tconsole.error = originalConsole;\n\t/* eslint-enable no-console */\n\n\tconst pass = !hasThrown && output.length === 0;\n\n\treturn {\n\t\tmessage: () => {\n\t\t\tif ( pass ) {\n\t\t\t\treturn `Expected callback \"${callback.toString()}\" to fail or at least produce some output`;\n\t\t\t}\n\n\t\t\treturn hasThrown\n\t\t\t\t? `Expected callback \"${callback.toString()}\" to succeed, `\n\t\t\t\t+ `but it failed with those errors:\\n${output.join( \"\\n\" )}\\n`\n\t\t\t\t: `Expected callback \"${callback.toString()}\" to not produce any output`;\n\t\t},\n\t\tpass,\n\t};\n}\n\n/**\n * Helper function which wraps some additional text around the given content\n * depending on the given template.\n *\n * @param\t{string}\tcontent\n *\t\tRendered content, e.g. in HTML format\n * @param\t{null|string}\tdescription\n *\t\tAdditional information regarding the current test\n * @param\t{null|string}\ttemplate\n *\t\tType of embedding, e.g. \"html\"; or\n *\t\tNull if the content shall be returned without changes.\n *\n * @returns\t{string}\n *\t\tUpdated content\n *\n * @this\n */\nfunction applyTemplate( content, description, template ) {\n\tif ( template === \"html\" ) {\n\t\tconst fullDescription = typeof description === \"string\" && description !== \"\"\n\t\t\t? `<br/><br/>${description.replace( \"<\", \"&lt;\" ).replace( \">\", \"&gt;\" )}\\n`\n\t\t\t: \"\";\n\t\treturn toDiffableHtml( \"<!DOCTYPE html>\\n\"\n\t\t\t+ \"<html style=\\\"height: 100%;\\\"><head></head>\"\n\t\t\t+ \"<body style=\\\"display: flex; flex-flow: column nowrap; \"\n\t\t\t+ \"justify-content: center; align-items: center; height: 100%;\\\">\"\n\t\t\t+ `<h2>${this.currentTestName}</h2>\\n`\n\t\t\t+ \"<!--[ Content from unit test: ]-->\\n\"\n\t\t\t+ `${content}\\n`\n\t\t\t+ \"<!--[ End of included content ]-->\\n\"\n\t\t\t+ `${fullDescription}</body></html>` );\n\t}\n\n\treturn content;\n}\n\n/**\n * Uses \"jest-matchers-utils\" to compose a diff of the two given strings.\n *\n * The improve readability, the result may only contain an extract of the actual content.\n *\n * @param\t{string}\toldContent\n *\t\tOld version of the text\n * @param\t{string}\tnewContent\n *\t\tNew version of the text\n *\n * @returns\t{string}\n *\t\tDescription of (some) differences between the two string, e.g.\n *\t\t\t- New content\n *\t\t\t+ Old content\n *\n *\t\t\t- ...0/svg\" width=\"95\" height=\"95\" style=\"background-color:yellow\">\n *\t\t\t+ ...0/svg\" width=\"125\" height=\"125\" style=\"background-color:yellow\">\n *\n * @this\n */\nfunction diffStrings( oldContent, newContent ) {\n\tconst { utils } = this;\n\n\tlet diffStart = null;\n\tlet oldDiff = null;\n\tlet newDiff = null;\n\tdo {\n\t\tdiffStart = diffStart === null ? 0 : diffStart + 50;\n\t\toldDiff = ( diffStart > 0 ? \"...\" : \"\" )\n\t\t\t+ oldContent.substr( diffStart, 250 )\n\t\t\t+ ( oldContent.length > diffStart + 250 ? \"...\" : \"\" );\n\t\tnewDiff = ( diffStart > 0 ? \"...\" : \"\" )\n\t\t\t+ newContent.substr( diffStart, 250 )\n\t\t\t+ ( newContent.length > diffStart + 250 ? \"...\" : \"\" );\n\t} while (\n\t\toldDiff.substr( 0, 50 ) === newDiff.substr( 0, 50 )\n\t\t&& diffStart + 50 < oldContent.length\n\t\t&& diffStart + 50 < newContent.length\n\t);\n\n\treturn utils.printDiffOrStringify( newDiff, oldDiff, \"New content\", \"Old content\", true );\n}\n\n/**\n * Reads the given file and ensures that its content matches the given string (if file exists); or\n * Writes the given string into a new file with the given name (if file doesn't exist)\n *\n * Important:\n * This test works asynchronously. Remember to always return its result in the test, i.e.\n *\t\t\"return expect( content ).toMatchNamedSnapshot( filename );\"\n *\n * Negation:\n * Ensures that the given file exists and that its content DOESN'T match the given string\n *\n * @param\t{string|object}\tcontentOrComponent\n *\t\tExpected content of the snapshot-file; or\n *\t\tReact component whose rendered code shall match the snapshot-file\n * @param\t{object}\toptionsBag\n * @param\t{string}\toptionsBag.filename\n *\t\tPath and name of the snapshot-file\n * @param\t{null|string}\toptionsBag.description\n *\t\tAdditional information regarding the current test\n *\t\twhich will be included in the snapshot-file\n * @param\t{null|string}\toptionsBag.template\n *\t\tNull if new content shall not be preprocessed; or\n *\t\t\"html\" if new content shall be wrapped into the body of a new HTML document.\n *\n * @returns\t{Promise<object>}\n *\t\tResolves with a description of the test result in the form { message: ..., pass: ... }\n *\n * @this\n */\nfunction toAsyncMatchNamedSnapshot( contentOrComponent, optionsBag ) {\t// eslint-disable-line max-lines-per-function\n\tconst { filename, description, template } = optionsBag;\n\n\t// eslint-disable-next-line max-statements\n\treturn new Promise( resolve => {\t// eslint-disable-line max-lines-per-function\n\t\tconst { snapshotState, testPath } = this;\n\t\tlet resolved = false;\n\t\tlet fileExisted = true;\n\n\t\t// @TODO Find a better way to determine the current update-mode!\n\t\t// (Current disadvantages: Accessing private property, interactive updates with key \"u\" don't work.)\n\t\tconst doUpdateAll = snapshotState._updateSnapshot === \"all\";\t// eslint-disable-line no-underscore-dangle\n\n\t\tconst basename = path.basename( filename )\n\t\t\t+ ( path.extname( filename ) === \"\" ? `.${template || \"snap\"}` : \"\" );\n\t\tconst dirname = path.basename( filename ) === filename ? path.dirname( testPath ) : path.dirname( filename );\n\t\tconst subdirname = path.join( dirname, \"__snapshots__\" );\n\t\tconst fullFilename = path.join( subdirname, basename );\n\n\t\t/**\n\t\t * Helper: Resolve with information about failed test, but does nothing if called again\n\t\t * @param\t{Error|string}\terror\tDescription of problem, e.g. \"Can't find directory\"\n\t\t */\n\t\tconst resolveError = error => {\n\t\t\tif ( !resolved ) {\n\t\t\t\tresolve( {\n\t\t\t\t\tpass:    false,\n\t\t\t\t\tmessage: () => error.message || error,\n\t\t\t\t} );\n\t\t\t\tresolved = true;\n\t\t\t}\n\t\t};\n\n\t\tlet fullContent = null;\n\t\ttry {\n\t\t\tif ( typeof contentOrComponent === \"string\" || contentOrComponent == null ) {\n\t\t\t\tfullContent = contentOrComponent || \"\";\n\t\t\t} else if (\n\t\t\t\tcontentOrComponent != null\n\t\t\t\t&& typeof contentOrComponent === \"object\"\n\t\t\t\t&& typeof globalRenderHook === \"function\"\n\t\t\t) {\n\t\t\t\tfullContent = globalRenderHook( contentOrComponent );\n\t\t\t\tif ( typeof fullContent !== \"string\" && fullContent != null ) {\n\t\t\t\t\tresolveError( \"Failed to automatically render component: \"\n\t\t\t\t\t\t+ `Unexpected return type ${typeof fullContent}`\n\t\t\t\t\t\t+ `(${JSON.stringify( fullContent )})` );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresolveError( \"Invalid type of content\" );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfullContent = applyTemplate.call( this, fullContent, description, template );\n\t\t} catch ( error ) {\n\t\t\tresolveError( error );\n\t\t\treturn;\n\t\t}\n\n\t\tfs.promises.stat( dirname ).catch( error => {\n\t\t\tresolveError( error.code === \"ENOENT\"\n\t\t\t\t? `FATAL: Can't find directory - check the path of your snapshot-file (${dirname})`\n\t\t\t\t: `FATAL: ${error.message}` );\n\t\t} )\n\t\t\t.then( () => ( resolved\n\t\t\t\t? null\n\t\t\t\t: fs.promises.mkdir( subdirname ).catch( error => {\n\t\t\t\t\tif ( error.code !== \"EEXIST\" ) {\n\t\t\t\t\t\tresolveError( `FATAL: ${error.code} Failed to prepared snapshot dir (${subdirname})` );\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t) )\n\t\t\t.then( () => ( resolved || doUpdateAll\n\t\t\t\t? null\n\t\t\t\t: fs.promises.readFile( fullFilename, \"utf8\" ).catch( error => {\n\t\t\t\t\tif ( error.code === \"ENOENT\" ) {\n\t\t\t\t\t\tfileExisted = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolveError( error );\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t) )\n\t\t\t.then( data => ( resolved || ( fileExisted && !doUpdateAll )\n\t\t\t\t? data\n\t\t\t\t: fs.promises.writeFile( fullFilename, fullContent )\n\t\t\t\t\t.then( () => fs.promises.readFile( fullFilename, \"utf8\" ) )\n\t\t\t) )\n\t\t\t.then( data => {\n\t\t\t\tif ( resolved ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( data !== null && data === fullContent ) {\n\t\t\t\t\tresolve( {\n\t\t\t\t\t\tpass:    true,\n\t\t\t\t\t\tmessage: () => ( fileExisted\n\t\t\t\t\t\t\t? `ERROR: Old content of file \"${basename}\" was expected to differ from new content`\n\t\t\t\t\t\t\t: `ERROR: File \"${basename}\" was expected to already exist with some different content` ),\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tconst diff = diffStrings.call( this, data, fullContent );\n\t\t\t\t\tresolve( {\n\t\t\t\t\t\tpass:    false,\n\t\t\t\t\t\tmessage: () => `ERROR: Old content of file \"${basename}\" `\n\t\t\t\t\t\t\t\t+ `was expected to equal the new content:\\n${diff}`,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( resolveError );\n\t} );\n}\n\nmodule.exports = {\n\tconnectRenderer,\n\n\t// eslint-disable-next-line require-jsdoc\n\ttoThrowWithSuppressedOutput( callback ) {\n\t\treturn toThrowWithSuppressedOutput.call( this, callback );\n\t},\n\t// eslint-disable-next-line require-jsdoc\n\ttoSucceedWithMessages( callback ) {\n\t\treturn toSucceedWithMessages.call( this, callback );\n\t},\n\t// eslint-disable-next-line require-jsdoc\n\ttoSucceedWithoutMessages( callback ) {\n\t\treturn toSucceedWithoutMessages.call( this, callback );\n\t},\n\t// eslint-disable-next-line require-jsdoc\n\ttoAsyncMatchNamedSnapshot( content, filename ) {\n\t\treturn toAsyncMatchNamedSnapshot.call( this, content, { filename } );\n\t},\n\t// eslint-disable-next-line require-jsdoc\n\ttoAsyncMatchNamedHTMLSnapshot( content, filename, description ) {\n\t\treturn toAsyncMatchNamedSnapshot.call( this, content, { filename, description, template: \"html\" } );\n\t},\n};\n"]}