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C,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;aACzD;QACH,CAAC;QAGD,wBAAO,GAAP,UAAQ,IAAU;YAChB,IAAI,IAAI,CAAC,KAAK,EAAE;gBACd,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAS,IAAI,CAAC,EAAE,UAAK,IAAI,CAAC,WAAW,QAAK,CAAC,CAAC;gBAC/D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;aACnE;iBAAM,IAAI,IAAI,CAAC,OAAO,EAAE;gBACvB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAS,IAAI,CAAC,EAAE,UAAK,IAAI,CAAC,OAAO,MAAG,CAAC,CAAC;aACxD;iBAAM;gBACL,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAS,IAAI,CAAC,EAAE,UAAK,IAAI,CAAC,WAAW,QAAK,CAAC,CAAC;aAC9D;QACH,CAAC;QA3CD;YADC,uBAAY,EAAE;2CAGd;QAGD;YADC,uBAAY,EAAE;yCAKd;QAGD;YADC,uBAAY,EAAE;8CAoBd;QAGD;YADC,uBAAY,EAAE;6CAUd;QACH,aAAC;KAAA,AA9CD,CAAoC,sBAAY,GA8C/C;sBA9CoB,MAAM","sourcesContent":["import Suite from '../Suite';\nimport Test from '../Test';\nimport TextCoverage from './TextCoverage';\nimport { eventHandler } from './Reporter';\n\n/**\n * The Simple reporter outputs to the terminal console.\n */\nexport default class Simple extends TextCoverage {\n @eventHandler()\n error(error: Error) {\n this.console.error(this.formatError(error));\n }\n\n @eventHandler()\n log(message: string) {\n message.split('\\n').forEach(line => {\n this.console.log(`DEBUG: ${line}`);\n });\n }\n\n @eventHandler()\n suiteEnd(suite: Suite) {\n if (suite.error) {\n this.console.warn('SUITE ERROR');\n this.console.error(this.formatError(suite.error));\n } else {\n const numTests = suite.numTests;\n const numFailedTests = suite.numFailedTests;\n const numSkippedTests = suite.numSkippedTests;\n let message = `${numFailedTests}/${numTests} tests failed`;\n if (suite.name) {\n message += ` in ${suite.name}`;\n }\n\n if (numSkippedTests > 0) {\n message += ` (${numSkippedTests} skipped)`;\n }\n\n this.console[numFailedTests ? 'warn' : 'info'](message);\n }\n }\n\n @eventHandler()\n testEnd(test: Test) {\n if (test.error) {\n this.console.error(`FAIL: ${test.id} (${test.timeElapsed}ms)`);\n this.console.error(this.formatError(test.error, { space: ' ' }));\n } else if (test.skipped) {\n this.console.log(`SKIP: ${test.id} (${test.skipped})`);\n } else {\n this.console.log(`PASS: ${test.id} (${test.timeElapsed}ms)`);\n }\n }\n}\n"]} |