diff --git a/features/support/exception_classes.js b/features/support/exception_classes.js index 36e76da44..36bdffe8b 100644 --- a/features/support/exception_classes.js +++ b/features/support/exception_classes.js @@ -3,6 +3,7 @@ var util = require('util'); var path = require('path'); var fs = require('fs'); +var chalk = require('chalk'); var OSRMError = class extends Error { constructor (process, code, msg, log, lines) { @@ -118,9 +119,9 @@ module.exports = { this.diff.forEach((row) => { var rowString = '| '; this.headers.forEach((header) => { - if (!row.c_status) rowString += ' ' + row[header] + ' | '; - else if (row.c_status === 'undefined') rowString += '(-) ' + row[header] + ' | '; - else rowString += '(+) ' + row[header] + ' | '; + if (!row.c_status) rowString += chalk.green(' ' + row[header] + ' | '); + else if (row.c_status === 'undefined') rowString += chalk.yellow('(-) ' + row[header] + ' | '); + else rowString += chalk.red('(+) ' + row[header] + ' | '); }); s.push(rowString); }); diff --git a/package.json b/package.json index e8fe8c918..46c0bb70c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "d3-queue": "^2.0.3", "node-timeout": "0.0.4", "request": "^2.69.0", - "xmlbuilder": "^4.2.1" + "xmlbuilder": "^4.2.1", + "chalk": "^1.1.3" }, "bin": { "cucumber": "./node_modules/cucumber/bin/cucumber.js"