From 359766b2c3f686fe4ebe5cd6bc4e99280e09b450 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 27 Nov 2019 22:56:21 -0800 Subject: benchmark,doc,lib,test: prepare for padding lint rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upcoming lint rule will require a blank line between consecutive functions. Add it in the places where we don't have it already. PR-URL: https://github.com/nodejs/node/pull/30696 Reviewed-By: Michaƫl Zasso Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: Gus Caplan Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Denys Otrishko Reviewed-By: Luigi Pinca --- test/es-module/test-esm-data-urls.js | 1 + test/parallel/test-event-emitter-listeners.js | 3 +++ test/parallel/test-event-emitter-remove-listeners.js | 1 + test/parallel/test-fs-realpath.js | 1 + test/parallel/test-http-unix-socket-keep-alive.js | 1 + test/parallel/test-repl-options.js | 1 + test/parallel/test-stream-transform-flush-data.js | 1 + test/parallel/test-tls-fast-writing.js | 1 + test/parallel/test-util-promisify.js | 1 + test/pummel/test-fs-watch-file.js | 1 + test/sequential/test-inspector-port-cluster.js | 1 + 11 files changed, 13 insertions(+) (limited to 'test') diff --git a/test/es-module/test-esm-data-urls.js b/test/es-module/test-esm-data-urls.js index 7efe7a1199..30ae55d01f 100644 --- a/test/es-module/test-esm-data-urls.js +++ b/test/es-module/test-esm-data-urls.js @@ -4,6 +4,7 @@ const assert = require('assert'); function createURL(mime, body) { return `data:${mime},${body}`; } + function createBase64URL(mime, body) { return `data:${mime};base64,${Buffer.from(body).toString('base64')}`; } diff --git a/test/parallel/test-event-emitter-listeners.js b/test/parallel/test-event-emitter-listeners.js index 52a108ad0e..eb1da829c9 100644 --- a/test/parallel/test-event-emitter-listeners.js +++ b/test/parallel/test-event-emitter-listeners.js @@ -26,10 +26,13 @@ const assert = require('assert'); const events = require('events'); function listener() {} + function listener2() {} + function listener3() { return 0; } + function listener4() { return 1; } diff --git a/test/parallel/test-event-emitter-remove-listeners.js b/test/parallel/test-event-emitter-remove-listeners.js index 925f828f93..8b9d621560 100644 --- a/test/parallel/test-event-emitter-remove-listeners.js +++ b/test/parallel/test-event-emitter-remove-listeners.js @@ -25,6 +25,7 @@ const assert = require('assert'); const EventEmitter = require('events'); function listener1() {} + function listener2() {} { diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 8b3bb68967..2642f51842 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -490,6 +490,7 @@ function test_abs_with_kids(realpath, realpathSync, cb) { try { fs.rmdirSync(root + folder); } catch {} }); } + function setup() { cleanup(); ['', diff --git a/test/parallel/test-http-unix-socket-keep-alive.js b/test/parallel/test-http-unix-socket-keep-alive.js index 11b3d9b392..fd3c6a7b16 100644 --- a/test/parallel/test-http-unix-socket-keep-alive.js +++ b/test/parallel/test-http-unix-socket-keep-alive.js @@ -27,6 +27,7 @@ function asyncLoop(fn, times, cb) { } }); } + function makeKeepAliveRequest(cb) { http.get({ socketPath: common.PIPE, diff --git a/test/parallel/test-repl-options.js b/test/parallel/test-repl-options.js index cbb5a9a6e5..9f40c6279b 100644 --- a/test/parallel/test-repl-options.js +++ b/test/parallel/test-repl-options.js @@ -62,6 +62,7 @@ assert.strictEqual(r1.useColors, r1.rli.terminal); // 2 function writer() {} + function evaler() {} const r2 = repl.start({ input: stream, diff --git a/test/parallel/test-stream-transform-flush-data.js b/test/parallel/test-stream-transform-flush-data.js index 6d6aedd3a7..51e2c8bc52 100644 --- a/test/parallel/test-stream-transform-flush-data.js +++ b/test/parallel/test-stream-transform-flush-data.js @@ -12,6 +12,7 @@ const expected = 'asdf'; function _transform(d, e, n) { n(); } + function _flush(n) { n(null, expected); } diff --git a/test/parallel/test-tls-fast-writing.js b/test/parallel/test-tls-fast-writing.js index af40cc33ba..4718acf285 100644 --- a/test/parallel/test-tls-fast-writing.js +++ b/test/parallel/test-tls-fast-writing.js @@ -68,6 +68,7 @@ server.listen(0, function() { process.exit(0); write(); } + function write() { // This needs to return false eventually while (false !== conn.write(chunk)); diff --git a/test/parallel/test-util-promisify.js b/test/parallel/test-util-promisify.js index 0bece0df42..77601eae6d 100644 --- a/test/parallel/test-util-promisify.js +++ b/test/parallel/test-util-promisify.js @@ -26,6 +26,7 @@ const stat = promisify(fs.stat); { function fn() {} + function promisifedFn() {} fn[promisify.custom] = promisifedFn; assert.strictEqual(promisify(fn), promisifedFn); diff --git a/test/pummel/test-fs-watch-file.js b/test/pummel/test-fs-watch-file.js index 0d897bdc4a..ca8aecc872 100644 --- a/test/pummel/test-fs-watch-file.js +++ b/test/pummel/test-fs-watch-file.js @@ -86,6 +86,7 @@ assert.throws( fs.unwatchFile(filepathTwo, a); ++watchSeenTwo; } + function b() { fs.unwatchFile(filepathTwo, b); ++watchSeenTwo; diff --git a/test/sequential/test-inspector-port-cluster.js b/test/sequential/test-inspector-port-cluster.js index 7579f51dee..55a0d14906 100644 --- a/test/sequential/test-inspector-port-cluster.js +++ b/test/sequential/test-inspector-port-cluster.js @@ -205,6 +205,7 @@ function testRunnerMain() { }); }); } + function masterProcessMain() { const workers = JSON.parse(process.env.workers); const clusterSettings = JSON.parse(process.env.clusterSettings) || {}; -- cgit v1.2.3