diff --git a/.eslintrc b/.eslintrc index ed177845..356a6546 100644 --- a/.eslintrc +++ b/.eslintrc @@ -26,6 +26,7 @@ "no-undef": "error", "no-useless-escape": "error", "operator-linebreak": ["error", "before"], + "space-infix-ops": "error", "space-unary-ops": ["error", { "words": false, "nonwords": false, diff --git a/example/two.js b/example/two.js index 0e315163..de5b213a 100644 --- a/example/two.js +++ b/example/two.js @@ -6,13 +6,13 @@ test('one', function (t) { t.plan(2); t.ok(true); setTimeout(function () { - t.equal(1+3, 4); + t.equal(1 + 3, 4); }, 100); }); test('two', function (t) { t.plan(3); - t.equal(5, 2+3); + t.equal(5, 2 + 3); setTimeout(function () { t.equal('a'.charCodeAt(0), 97); t.ok(true); diff --git a/test/browser/asserts.js b/test/browser/asserts.js index 690597ca..fb981b7c 100644 --- a/test/browser/asserts.js +++ b/test/browser/asserts.js @@ -5,7 +5,7 @@ var test = require('../../'); test(function (t) { t.plan(4); t.ok(true); - t.equal(3, 1+2); + t.equal(3, 1 + 2); t.deepEqual([1, 2, [3, 4]], [1, 2, [3, 4]]); t.notDeepEqual([1, 2, [3, 4, 5]], [1, 2, [3, 4]]); }); diff --git a/test/teardown.js b/test/teardown.js index e5013cf4..b86da8ed 100644 --- a/test/teardown.js +++ b/test/teardown.js @@ -95,7 +95,7 @@ tap.test('teardowns', function (tt) { ' [... stack stripped ...]', ' ...', i > 0 ? [] : [ - 'not ok '+ (offset + 1) +' plan != count', + 'not ok ' + (offset + 1) + ' plan != count', ' ---', ' operator: fail', ' expected: 1', diff --git a/test/todo_explanation.js b/test/todo_explanation.js index d0a57118..ce015826 100644 --- a/test/todo_explanation.js +++ b/test/todo_explanation.js @@ -7,7 +7,7 @@ var concat = require('concat-stream'); var common = require('./common'); var stripFullStack = common.stripFullStack; -tap.test('tape todo test', { todo: process.versions.node.match(/0\.8\.\d+/) ? 'Fails on node 0.8': false }, function (assert) { +tap.test('tape todo test', { todo: process.versions.node.match(/0\.8\.\d+/) ? 'Fails on node 0.8' : false }, function (assert) { var test = tape.createHarness({ exit: false }); assert.plan(1);