{"version":3,"sources":["jsdelivr-header.js","/npm/jasmine-json-test-reporter@1.0.0-beta/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IAAI,GAAK,QAAQ,MAEb,YAAc,CACjB,KAAM,4BACN,UAAU,EACV,iBAAkB,GAGnB,SAAS,SAAS,GACjB,IAAI,EAAU,aAAa,YAA6B,iBAAT,EAAoB,EAAO,CAAC,GACvE,EAAc,GACd,EAAgB,OAAO,OAAO,MAElC,KAAK,UAAY,SAAS,GACzB,EAAM,MAAQ,EACd,EAAc,EAAM,IAAM,EAC1B,EAAc,EACf,EAEA,KAAK,SAAW,SAAS,GACxB,EAAY,KAAK,EAClB,EAEA,KAAK,YAAc,WAClB,IAAI,EAAgB,EAAQ,SAC3B,KAAK,UAAU,EAAe,KAAM,EAAQ,kBAC5C,KAAK,UAAU,GAEhB,GAAG,cAAc,EAAQ,KAAM,EAChC,CACD,CAEA,SAAS,aAAa,EAAM,GAC3B,IAAI,EAAY,CAAC,EAOjB,OALA,OAAO,KAAK,GAAM,SAAQ,SAAS,GAC7B,EAAK,GACL,EAAU,GAAO,EAAK,GADX,EAAU,GAAO,EAAK,EAEvC,IAEO,CACR,CAEA,OAAO,QAAU","file":"/npm/jasmine-json-test-reporter@1.0.0-beta/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/jasmine-json-test-reporter@1.0.0-beta/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","var fs = require('fs')\n\nvar defaultOpts = {\n\tfile: 'jasmine-test-results.json',\n\tbeautify: true,\n\tindentationLevel: 4 // used if beautify === true\n};\n\nfunction reporter(opts) {\n\tvar options = shallowMerge(defaultOpts, typeof opts === 'object' ? opts : {});\n\tvar specResults = [];\n\tvar masterResults = Object.create(null);\n\n\tthis.suiteDone = function(suite) {\n\t\tsuite.specs = specResults;\n\t\tmasterResults[suite.id] = suite;\n\t\tspecResults = [];\n\t};\n\n\tthis.specDone = function(spec) {\n\t\tspecResults.push(spec);\n\t};\n\n\tthis.jasmineDone = function() {\n\t\tvar resultsOutput = options.beautify ?\n\t\t\tJSON.stringify(masterResults, null, options.indentationLevel) :\n\t\t\tJSON.stringify(masterResults);\n\n\t\tfs.writeFileSync(options.file, resultsOutput);\n\t};\n};\n\nfunction shallowMerge(obj1, obj2) {\n\tvar mergedObj = {};\n\n\tObject.keys(obj1).forEach(function(key) {\n\t\tif (!obj2[key]) mergedObj[key] = obj1[key];\n\t\telse mergedObj[key] = obj2[key];\n\t});\n\n\treturn mergedObj;\n};\n\nmodule.exports = reporter;"]}