Skip to content

Commit

Permalink
test: Reordered parameters to the test-tcp-wrap-connect, so the param…
Browse files Browse the repository at this point in the history
…eters follow the order actual-value->expected-value.

Refs: test/parallel/test-tcp-wrap-connect.js
  • Loading branch information
lotharthesavior committed Oct 12, 2018
1 parent bcbb937 commit 91bd5fb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/parallel/test-tcp-wrap-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ function makeConnection() {
assert.strictEqual(err, 0);

req.oncomplete = function(status, client_, req_, readable, writable) {
assert.strictEqual(0, status);
assert.strictEqual(client, client_);
assert.strictEqual(req, req_);
assert.strictEqual(true, readable);
assert.strictEqual(true, writable);
assert.strictEqual(status, 0);
assert.strictEqual(client_, client);
assert.strictEqual(req_, req);
assert.strictEqual(readable, true);
assert.strictEqual(writable, true);

const shutdownReq = new ShutdownWrap();
const err = client.shutdown(shutdownReq);
assert.strictEqual(err, 0);

shutdownReq.oncomplete = function(status, client_, error) {
assert.strictEqual(0, status);
assert.strictEqual(client, client_);
assert.strictEqual(error, undefined);
assert.strictEqual(status, 0);
assert.strictEqual(client_, client);
assert.strictEqual(undefined, error);
shutdownCount++;
client.close();
};
Expand All @@ -55,7 +55,7 @@ const server = require('net').Server(function(s) {
server.listen(0, makeConnection);

process.on('exit', function() {
assert.strictEqual(1, shutdownCount);
assert.strictEqual(1, connectCount);
assert.strictEqual(1, endCount);
assert.strictEqual(shutdownCount, 1);
assert.strictEqual(connectCount, 1);
assert.strictEqual(endCount, 1);
});

0 comments on commit 91bd5fb

Please sign in to comment.