THRIFT-5811: Update eslint & prettier
Client: js
Patch: Cameron Martin
This closes #3087
diff --git a/lib/nodejs/test/client.js b/lib/nodejs/test/client.js
index 31ea06e..1d137ff 100644
--- a/lib/nodejs/test/client.js
+++ b/lib/nodejs/test/client.js
@@ -25,8 +25,8 @@
const ThriftTest = require(`./${helpers.genPath}/ThriftTest`);
const ThriftTestDriver = require("./test_driver").ThriftTestDriver;
-const ThriftTestDriverPromise = require("./test_driver")
- .ThriftTestDriverPromise;
+const ThriftTestDriverPromise =
+ require("./test_driver").ThriftTestDriverPromise;
const SecondService = require(`./${helpers.genPath}/SecondService`);
const program = require("commander");
@@ -34,24 +34,24 @@
program
.option(
"-p, --protocol <protocol>",
- "Set thrift protocol (binary|compact|json) [protocol]"
+ "Set thrift protocol (binary|compact|json) [protocol]",
)
.option(
"-t, --transport <transport>",
- "Set thrift transport (buffered|framed|http) [transport]"
+ "Set thrift transport (buffered|framed|http) [transport]",
)
.option("--port <port>", "Set thrift server port number to connect", 9090)
.option("--host <host>", "Set thrift server host to connect", "localhost")
.option(
"--domain-socket <path>",
- "Set thrift server unix domain socket to connect"
+ "Set thrift server unix domain socket to connect",
)
.option("--ssl", "use SSL transport")
.option("--callback", "test with callback style functions")
.option(
"-t, --type <type>",
"Select server type (http|multiplex|tcp|websocket)",
- "tcp"
+ "tcp",
)
.option("--es6", "Use es6 code")
.option("--es5", "Use es5 code")
@@ -76,7 +76,7 @@
const options = {
transport: helpers.transports[program.transport],
- protocol: helpers.protocols[program.protocol]
+ protocol: helpers.protocols[program.protocol],
};
if (type === "http" || type === "websocket") {
@@ -128,7 +128,7 @@
connection.open();
}
-connection.on("error", function(err) {
+connection.on("error", function (err) {
assert(false, err);
});
@@ -141,11 +141,11 @@
const secondclient = mp.createClient(
"SecondService",
SecondService,
- connection
+ connection,
);
- connection.on("connect", function() {
- secondclient.secondtestString("Test", function(err, response) {
+ connection.on("connect", function () {
+ secondclient.secondtestString("Test", function (err, response) {
assert(!err);
assert.equal('testString("Test")', response);
});
@@ -161,7 +161,7 @@
}
function runTests() {
- testDriver(client, function(status) {
+ testDriver(client, function (status) {
console.log(status);
if (type !== "http" && type !== "websocket") {
connection.end();
@@ -172,4 +172,4 @@
});
}
-exports.expressoTest = function() {};
+exports.expressoTest = function () {};