summaryrefslogtreecommitdiff
path: root/test/internet
diff options
context:
space:
mode:
authorSebastiaan Deckers <sebdeckers83@gmail.com>2017-07-10 20:55:21 -0400
committerRefael Ackermann <refack@gmail.com>2017-07-21 15:13:47 -0400
commitbb294059040def8e8c0b1719cc17f6537ab5cb39 (patch)
treeacc6b7bcf88da8e6078fa5ab91f6718289f32bbf /test/internet
parent4f875222445b07016a8294fa5a5bf7418c735489 (diff)
downloadandroid-node-v8-bb294059040def8e8c0b1719cc17f6537ab5cb39.tar.gz
android-node-v8-bb294059040def8e8c0b1719cc17f6537ab5cb39.tar.bz2
android-node-v8-bb294059040def8e8c0b1719cc17f6537ab5cb39.zip
lib,src: fix consistent spacing inside braces
PR-URL: https://github.com/nodejs/node/pull/14162 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/internet')
-rw-r--r--test/internet/test-dgram-broadcast-multi-process.js4
-rw-r--r--test/internet/test-dns-ipv4.js4
-rw-r--r--test/internet/test-dns-ipv6.js2
-rw-r--r--test/internet/test-dns.js26
-rw-r--r--test/internet/test-tls-reuse-host-from-socket.js2
5 files changed, 21 insertions, 17 deletions
diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js
index 0ec4bbd9ce..82ddd7743f 100644
--- a/test/internet/test-dgram-broadcast-multi-process.js
+++ b/test/internet/test-dgram-broadcast-multi-process.js
@@ -233,7 +233,7 @@ if (process.argv[2] === 'child') {
receivedMessages.push(buf);
- process.send({message: buf.toString()});
+ process.send({ message: buf.toString() });
if (receivedMessages.length === messages.length) {
process.nextTick(function() {
@@ -252,7 +252,7 @@ if (process.argv[2] === 'child') {
});
listenSocket.on('listening', function() {
- process.send({listening: true});
+ process.send({ listening: true });
});
listenSocket.bind(common.PORT);
diff --git a/test/internet/test-dns-ipv4.js b/test/internet/test-dns-ipv4.js
index 4d4c7da6a7..d3d5ba2200 100644
--- a/test/internet/test-dns-ipv4.js
+++ b/test/internet/test-dns-ipv4.js
@@ -155,7 +155,7 @@ TEST(function test_lookup_localhost_ipv4(done) {
TEST(function test_lookup_all_ipv4(done) {
const req = dns.lookup(
'www.google.com',
- {all: true, family: 4},
+ { all: true, family: 4 },
common.mustCall((err, ips) => {
assert.ifError(err);
assert.ok(Array.isArray(ips));
@@ -190,7 +190,7 @@ TEST(function test_lookupservice_ip_ipv4(done) {
TEST(function test_lookupservice_ip_ipv4_promise(done) {
util.promisify(dns.lookupService)('127.0.0.1', 80)
- .then(common.mustCall(({hostname, service}) => {
+ .then(common.mustCall(({ hostname, service }) => {
assert.strictEqual(typeof hostname, 'string');
assert(hostname.length > 0);
assert(['http', 'www', '80'].includes(service));
diff --git a/test/internet/test-dns-ipv6.js b/test/internet/test-dns-ipv6.js
index 9b9360c2a1..a91b108456 100644
--- a/test/internet/test-dns-ipv6.js
+++ b/test/internet/test-dns-ipv6.js
@@ -154,7 +154,7 @@ TEST(function test_lookup_ip_ipv6(done) {
TEST(function test_lookup_all_ipv6(done) {
const req = dns.lookup(
'www.google.com',
- {all: true, family: 6},
+ { all: true, family: 6 },
common.mustCall((err, ips) => {
assert.ifError(err);
assert.ok(Array.isArray(ips));
diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js
index e4bdfe51b7..aa596822df 100644
--- a/test/internet/test-dns.js
+++ b/test/internet/test-dns.js
@@ -403,22 +403,26 @@ TEST(function test_lookup_failure(done) {
TEST(function test_lookup_ip_all(done) {
- const req = dns.lookup('127.0.0.1', {all: true}, function(err, ips, family) {
- assert.ifError(err);
- assert.ok(Array.isArray(ips));
- assert.ok(ips.length > 0);
- assert.strictEqual(ips[0].address, '127.0.0.1');
- assert.strictEqual(ips[0].family, 4);
+ const req = dns.lookup(
+ '127.0.0.1',
+ { all: true },
+ function(err, ips, family) {
+ assert.ifError(err);
+ assert.ok(Array.isArray(ips));
+ assert.ok(ips.length > 0);
+ assert.strictEqual(ips[0].address, '127.0.0.1');
+ assert.strictEqual(ips[0].family, 4);
- done();
- });
+ done();
+ }
+ );
checkWrap(req);
});
TEST(function test_lookup_ip_all_promise(done) {
- const req = util.promisify(dns.lookup)('127.0.0.1', {all: true})
+ const req = util.promisify(dns.lookup)('127.0.0.1', { all: true })
.then(function(ips) {
assert.ok(Array.isArray(ips));
assert.ok(ips.length > 0);
@@ -444,7 +448,7 @@ TEST(function test_lookup_ip_promise(done) {
TEST(function test_lookup_null_all(done) {
- const req = dns.lookup(null, {all: true}, function(err, ips, family) {
+ const req = dns.lookup(null, { all: true }, function(err, ips, family) {
assert.ifError(err);
assert.ok(Array.isArray(ips));
assert.strictEqual(ips.length, 0);
@@ -457,7 +461,7 @@ TEST(function test_lookup_null_all(done) {
TEST(function test_lookup_all_mixed(done) {
- const req = dns.lookup('www.google.com', {all: true}, function(err, ips) {
+ const req = dns.lookup('www.google.com', { all: true }, function(err, ips) {
assert.ifError(err);
assert.ok(Array.isArray(ips));
assert.ok(ips.length > 0);
diff --git a/test/internet/test-tls-reuse-host-from-socket.js b/test/internet/test-tls-reuse-host-from-socket.js
index 73ee91d3b2..8501efd74e 100644
--- a/test/internet/test-tls-reuse-host-from-socket.js
+++ b/test/internet/test-tls-reuse-host-from-socket.js
@@ -30,7 +30,7 @@ const tls = require('tls');
const net = require('net');
const socket = net.connect(443, 'www.example.org', common.mustCall(() => {
- const secureSocket = tls.connect({socket: socket}, common.mustCall(() => {
+ const secureSocket = tls.connect({ socket: socket }, common.mustCall(() => {
secureSocket.destroy();
console.log('ok');
}));