diff --git a/.eslintrc b/.eslintrc index 4a8fb4a0..88dc68e8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -47,6 +47,7 @@ "object-curly-spacing": ["error", "always"], "operator-linebreak": ["error", "before"], "semi-style": ["error", "last"], + "space-in-parens": ["error", "never"], "space-infix-ops": "error", "space-unary-ops": ["error", { "words": false, diff --git a/bin/tape b/bin/tape index 027fbb1b..35e1e791 100755 --- a/bin/tape +++ b/bin/tape @@ -25,7 +25,7 @@ if (typeof opts.require === 'string') { } opts.require.forEach(function (module) { - var options = { basedir: cwd, extensions: Object.keys(require.extensions) }; + var options = { basedir: cwd, extensions: Object.keys(require.extensions) }; if (module) { /* This check ensures we ignore `-r ""`, trailing `-r`, or * other silly things the user might (inadvertently) be doing. diff --git a/test/async-await/async-bug.js b/test/async-await/async-bug.js index 219db582..b9fde636 100644 --- a/test/async-await/async-bug.js +++ b/test/async-await/async-bug.js @@ -24,7 +24,6 @@ test('async-error', async function myTest(t) { t.end(); }); - function sleep(ms) { return new Promise((resolve) => { setTimeout(resolve, ms); diff --git a/test/comment.js b/test/comment.js index c63395ac..b9933b53 100644 --- a/test/comment.js +++ b/test/comment.js @@ -64,7 +64,6 @@ tap.test('null argument', function (assert) { }); }); - // Exploratory test, how is whitespace treated? tap.test('whitespace', function (assert) { assert.plan(1); diff --git a/test/create_multiple_streams.js b/test/create_multiple_streams.js index 19cd5f9e..9307e881 100644 --- a/test/create_multiple_streams.js +++ b/test/create_multiple_streams.js @@ -13,7 +13,7 @@ tape.test('createMultipleStreams', function (tt) { th('test one', function (tht) { tht.plan(1); - setTimeout( function () { + setTimeout(function () { tht.pass(); testOneComplete = true; }, 100); @@ -26,8 +26,7 @@ tape.test('createMultipleStreams', function (tt) { th.onFinish(function () { tt.equal(th._results.count, 2, 'harness test ran'); - tt.equal(th._results.fail, 0, "harness test didn't fail"); + tt.equal(th._results.fail, 0, "harness test didn't fail"); }); }); - diff --git a/test/exit.js b/test/exit.js index d782b8f3..45c9df97 100644 --- a/test/exit.js +++ b/test/exit.js @@ -27,7 +27,7 @@ tap.test('exit ok', function (t) { '', '# ok', '', // yes, these double-blank-lines at the end are required. - '' // if you can figure out how to remove them, please do! + '' // if you can figure out how to remove them, please do! ].join('\n')); }; diff --git a/test/nested2.js b/test/nested2.js index 685fd15a..f167df61 100644 --- a/test/nested2.js +++ b/test/nested2.js @@ -12,7 +12,6 @@ test(function (t) { }); }); - t.test('teardown', function (st) { st.end(); });