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,YAAY,yBAAyB,EAAU,GAC9E,EAAK,OAAS,IACd,EAAO,QAAQ,IAAI,GAAW,QAAQ,IAAI,GAC1C,GAAiB,EACrB,IAEC,GACD,QAAQ,IAAI,sBAEpB,CAlBA,QAAQ,WAAa,WAmBrB,QAAQ,sBAAwB","file":"/npm/jest-test-diff@2.1.4/dist/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/jest-test-diff@2.1.4/dist/src/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","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.print_diff_from_files = exports.print_diff = void 0;\nconst fs = require('fs');\nconst git_diff_1 = require(\"./git-diff\");\nconst jest_info_1 = require(\"./jest-info\");\nfunction print_diff(gDiff = null, ignore = [], flat = false) {\n    return __awaiter(this, void 0, void 0, function* () {\n        if (gDiff === null) {\n            throw \"error no git diff provided\";\n        }\n        const files = (0, git_diff_1.specFilesChanged)(gDiff, ignore);\n        print_diff_from_files(files, flat);\n    });\n}\nexports.print_diff = print_diff;\nfunction print_diff_from_files(files, flat, gDiff = undefined) {\n    if (files === undefined || !files.length) {\n        return console.error('No test files changes');\n    }\n    let changesPrinted = false;\n    files.forEach((filename) => {\n        const linesChanged = (gDiff) ? (0, git_diff_1.linesFromGitDiff)(gDiff, filename) : null;\n        const specFile = fs.readFileSync(filename, 'utf8');\n        const { tree, doc, flatDoc } = (0, jest_info_1.descriptionFromSpecFile)(specFile, linesChanged);\n        if (tree.length > 0) {\n            flat ? console.log(flatDoc) : console.log(doc);\n            changesPrinted = true;\n        }\n    });\n    if (!changesPrinted) {\n        console.log('No changes to print');\n    }\n}\nexports.print_diff_from_files = print_diff_from_files;\n"]}