{"version":3,"sources":["jsdelivr-header.js","/npm/jest-teamcity@1.12.0/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACFA,MAAM,UAAY,QAAQ,eAE1B,OAAO,QAAU,SAAU,GACzB,MAAM,EAAS,QAAQ,IAAI,iBAAmB,QAAQ,IAAI,WACpD,EAAkB,QAAQ,IAAI,iBAC9B,EAAmB,QAAQ,IAAI,aAIrC,eAcA,OAJI,GACF,UAAU,aAAa,EAAO,YAAa,QAAQ,MAAO,EAAQ,GAG7D,EAbD,IACF,KAAK,aAAe,CAAC,EAAG,KACtB,UAAU,aAAa,CAAC,GAAS,QAAQ,MAAO,EAAQ,EAAiB,EAYjF","file":"/npm/jest-teamcity@1.12.0/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/jest-teamcity@1.12.0/lib/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 * @author Ivan Tereshchenkov\n */\n\nconst formatter = require(\"./formatter\");\n\nmodule.exports = function (result) {\n  const flowId = process.env.TEAMCITY_FLOWID || process.pid.toString();\n  const teamCityVersion = process.env.TEAMCITY_VERSION;\n  const projectSuiteName = process.env.PROJECT_NAME;\n  \n  // Constructor call means usage as a Jest reporter\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new.target\n  if (new.target) {\n    if (teamCityVersion) {\n      this.onTestResult = (_, result) => {\n        formatter.formatReport([result], process.cwd(), flowId, projectSuiteName);\n      };\n    }\n\n    return;\n  }\n\n  if (teamCityVersion) {\n    formatter.formatReport(result.testResults, process.cwd(), flowId, projectSuiteName);\n  }\n\n  return result;\n};\n"]}