diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 2c3512a19..9d6ae3aa8 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -155,15 +155,15 @@ module.exports = (grunt) -> grunt.log.error("Process error: #{err}") testProc.on 'close', (exitCode, signal) -> - #if testSucceeded - done() - # else - # testOutput = testOutput.replace(/\x1b\[[^m]+m/g, '') - # url = "https://hooks.slack.com/services/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" - # request.post - # url: url - # json: - # username: "Edgehill Builds" - # text: "Aghhh somebody broke the build. ```#{testOutput}```" - # , (err, httpResponse, body) -> - # done(false) + if testSucceeded + done() + else + testOutput = testOutput.replace(/\x1b\[[^m]+m/g, '') + url = "https://hooks.slack.com/services/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" + request.post + url: url + json: + username: "Edgehill Builds" + text: "Aghhh somebody broke the build. ```#{testOutput}```" + , (err, httpResponse, body) -> + done(false)