Skip to content

Commit

Permalink
test: update assertion parameter order
Browse files Browse the repository at this point in the history
Update assertions to be `value`, `expectedValue`.

PR-URL: #23614
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
seanhealy authored and MylesBorins committed Nov 29, 2018
1 parent 4c35953 commit 8be279a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/parallel/test-http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const proxy = http.createServer(function(req, res) {

console.error(`proxy res headers: ${JSON.stringify(proxy_res.headers)}`);

assert.strictEqual('world', proxy_res.headers.hello);
assert.strictEqual('text/plain', proxy_res.headers['content-type']);
assert.deepStrictEqual(cookies, proxy_res.headers['set-cookie']);
assert.strictEqual(proxy_res.headers.hello, 'world');
assert.strictEqual(proxy_res.headers['content-type'], 'text/plain');
assert.deepStrictEqual(proxy_res.headers['set-cookie'], cookies);

res.writeHead(proxy_res.statusCode, proxy_res.headers);

Expand All @@ -79,11 +79,11 @@ function startReq() {
path: '/test'
}, function(res) {
console.error('got res');
assert.strictEqual(200, res.statusCode);
assert.strictEqual(res.statusCode, 200);

assert.strictEqual('world', res.headers.hello);
assert.strictEqual('text/plain', res.headers['content-type']);
assert.deepStrictEqual(cookies, res.headers['set-cookie']);
assert.strictEqual(res.headers.hello, 'world');
assert.strictEqual(res.headers['content-type'], 'text/plain');
assert.deepStrictEqual(res.headers['set-cookie'], cookies);

res.setEncoding('utf8');
res.on('data', function(chunk) { body += chunk; });
Expand Down

0 comments on commit 8be279a

Please sign in to comment.