api/test/reporters/mocha-slack.js
Function SlackReporter
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
function SlackReporter (runner, options) {
mocha.reporters.Base.call(this, runner)
const notifier = new SlackNotifier(process.env.SLACK_WEBHOOK_URL || options.reporterOptions.webhook_url)
const context = process.env.MOCHA_CONTEXT || options.reporterOptions.context
let startTime