Skip to content

Commit

Permalink
test: fix a typo
Browse files Browse the repository at this point in the history
PR-URL: #276
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
  • Loading branch information
nechaido authored and belochub committed Jan 22, 2018
1 parent 981b21a commit fa1b0a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions test/node/transport-ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ test.afterEach((done) => {
done();
});

const webSocketAdress = (adress, transport) => {
const address = transport === 'WebSocket' ? [null] : [];
address.push(`ws://localhost:${adress.port}`);
return address;
const webSocketAddress = (address, transport) => {
const addr = transport === 'WebSocket' ? [null] : [];
addr.push(`ws://localhost:${address.port}`);
return addr;
};

const runTest = (transport, transportName) => {
test.test(`${transportName} must connect to server`, (test) => {
transport.connect(
app.name,
null,
...webSocketAdress(server.address(), transportName),
...webSocketAddress(server.address(), transportName),
(error, conn) => {
connection = conn;
test.assertNot(error, 'connect must not return an error');
Expand All @@ -53,7 +53,7 @@ const runTest = (transport, transportName) => {
app.name,
null,
interfaces,
...webSocketAdress(server.address(), transportName),
...webSocketAddress(server.address(), transportName),
(error, conn, api) => {
connection = conn;
test.assertNot(error, 'connectAndInspect must not return an error');
Expand Down
12 changes: 6 additions & 6 deletions test/node/transport-wss.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ test.afterEach((done) => {
done();
});

const webSocketAdress = (adress, transport) => {
const address = transport === 'WebSocket' ? [null] : [];
address.push(`wss://localhost:${adress.port}`);
return address;
const webSocketAddress = (address, transport) => {
const addr = transport === 'WebSocket' ? [null] : [];
addr.push(`wss://localhost:${address.port}`);
return addr;
};

const runTest = (transport, transportName) => {
test.test(`${transportName} must connect to server`, (test) => {
transport.connect(
app.name,
null,
...webSocketAdress(server.address(), transportName),
...webSocketAddress(server.address(), transportName),
(error, conn) => {
connection = conn;
test.assertNot(error, 'connect must not return an error');
Expand All @@ -64,7 +64,7 @@ const runTest = (transport, transportName) => {
app.name,
null,
interfaces,
...webSocketAdress(server.address(), transportName),
...webSocketAddress(server.address(), transportName),
(error, conn, api) => {
connection = conn;
test.assertNot(error, 'connectAndInspect must not return an error');
Expand Down

0 comments on commit fa1b0a0

Please sign in to comment.