diff --git a/src/formatters/stylish.js b/src/formatters/stylish.js index 864d55e..c91a78c 100644 --- a/src/formatters/stylish.js +++ b/src/formatters/stylish.js @@ -6,19 +6,19 @@ var chalk = require('chalk'); var _ = require('lodash'); var table = require('text-table'); -/** - * @param {MESSAGE} message - * @return {string} - */ -function getMessageType(message) { - if (message.level === 'WARN') { - return chalk.yellow('warning'); - } - if (message.level === 'ERROR') { - return chalk.red('error'); - } - return chalk.cyan('info'); -} +///** +// * @param {MESSAGE} message +// * @return {string} +// */ +//function getMessageType(message) { +// if (message.level === 'WARN') { +// return chalk.yellow('warning'); +// } +// if (message.level === 'ERROR') { +// return chalk.red('error'); +// } +// return chalk.cyan('info'); +//} /** * Given a word and a count, append an s if count is not one. @@ -34,9 +34,9 @@ function pluralize(word, count) { // return n === 1 ? single : plural; //} -function lineText(line) { - return line < 1 ? '' : line; -} +//function lineText(line) { +// return line < 1 ? '' : line; +//} //module.exports = function (warnings/*, config*/) { // var _ = require('lodash'); @@ -109,10 +109,10 @@ function lineText(line) { module.exports = function (results) { results = _.groupBy(results, 'file'); - var output = '\n', - total = 0, - errors = 0, - warnings = 0, + var output = '\n', + total = 0, + errors = 0, + warnings = 0, summaryColor = 'yellow'; _.each(results, function (result, k) { diff --git a/test/src/test.js b/test/src/test.js index ce654fc..9212b7b 100644 --- a/test/src/test.js +++ b/test/src/test.js @@ -64,7 +64,6 @@ function normalizeError(err) { test('invalid tests json', function (t) { var cli = require('../../src/cli'); - var context = require('../../src/context'); t.plan(invalidFiles.length); invalidFiles.forEach(check); @@ -210,7 +209,6 @@ test('html tests', function (t) { }); test('test context', function (t) { - var context = require('../../src/context'); context.clear(); t.equal(context.hasErrors(), false); context.error('hi', '', 1, 1); @@ -223,7 +221,6 @@ test('test context', function (t) { test('test shell', function (t) { var shell = require('../../src/shell'); - var context = require('../../src/context'); var newContext = _.cloneDeep(context); var outputJSON = ''; newContext.options.format = 'json';