From 9a7e738d8b8109306545cb0e9ce8e3f9e7b9724a Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Mon, 22 Jul 2019 15:59:55 -0700 Subject: [PATCH] spelling and lint (ignore) --- .eslintignore | 1 + tests/screenshot/diff-reporter.js | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.eslintignore b/.eslintignore index 0022114ea..8dd3beb37 100644 --- a/.eslintignore +++ b/.eslintignore @@ -9,6 +9,7 @@ gulpfile.js /tests/jsunit/* /tests/generators/* /tests/mocha/run_mocha_tests_in_browser.js +/tests/screenshot/* /tests/test_runner.js /tests/workspace_svg/* /generators/* diff --git a/tests/screenshot/diff-reporter.js b/tests/screenshot/diff-reporter.js index 905c87c73..726d5d8e0 100644 --- a/tests/screenshot/diff-reporter.js +++ b/tests/screenshot/diff-reporter.js @@ -42,7 +42,7 @@ function DiffReporter(runner) { var self = this; var indents = 0; var n = 0; - var colors = { + var colours = { pass: 32, fail: 31, 'bright pass': 92, @@ -73,9 +73,9 @@ function DiffReporter(runner) { }; /** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color + * colour `str` with the given `type`, + * allowing colours to be disabled, + * as well as user-defined colour * schemes. * * @private @@ -83,11 +83,11 @@ function DiffReporter(runner) { * @param {string} str * @return {string} */ - var color = function(type, str) { - if (!colors) { + var colour = function(type, str) { + if (!colours) { return String(str); } - return '\u001b[' + colors[type] + 'm' + str + '\u001b[0m'; + return '\u001b[' + colours[type] + 'm' + str + '\u001b[0m'; }; function indent() { @@ -100,7 +100,7 @@ function DiffReporter(runner) { }); runner.on('suite', function(suite) { ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); + console.log(colour('suite', '%s%s'), indent(), suite.title); }); runner.on('suite end', function() { --indents; @@ -113,8 +113,8 @@ function DiffReporter(runner) { json_tests.push(test); var logStr = indent() + - color('checkmark', ' ' + symbols.ok) + - color('pass', ' ' + test.title); + colour('checkmark', ' ' + symbols.ok) + + colour('pass', ' ' + test.title); console.log(logStr); }); @@ -122,7 +122,7 @@ function DiffReporter(runner) { failures++; json_tests.push(test); // Print test information the way the spec reporter would. - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); + console.log(indent() + colour('fail', ' %d) %s'), ++n, test.title); }); runner.on('end', function() {