test: use strictEqual consistently in agent test
Update parallel/test-http-agent-getname to use assert.strictEqual() consistently and const-ify variables while we're here. PR-URL: https://github.com/nodejs/node/pull/6654 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
fb19b800b8
commit
ead6c2d5bb
@ -1,13 +1,13 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('../common');
|
require('../common');
|
||||||
var assert = require('assert');
|
const assert = require('assert');
|
||||||
var http = require('http');
|
const http = require('http');
|
||||||
|
|
||||||
var agent = new http.Agent();
|
const agent = new http.Agent();
|
||||||
|
|
||||||
// default to localhost
|
// default to localhost
|
||||||
assert.equal(
|
assert.strictEqual(
|
||||||
agent.getName({
|
agent.getName({
|
||||||
port: 80,
|
port: 80,
|
||||||
localAddress: '192.168.1.1'
|
localAddress: '192.168.1.1'
|
||||||
@ -16,13 +16,13 @@ assert.equal(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// empty
|
// empty
|
||||||
assert.equal(
|
assert.strictEqual(
|
||||||
agent.getName({}),
|
agent.getName({}),
|
||||||
'localhost::'
|
'localhost::'
|
||||||
);
|
);
|
||||||
|
|
||||||
// pass all arguments
|
// pass all arguments
|
||||||
assert.equal(
|
assert.strictEqual(
|
||||||
agent.getName({
|
agent.getName({
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 80,
|
port: 80,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user