Skip to content

Commit 4422269

Browse files
seanhealyjasnell
authored andcommitted
test: update assertion parameter order
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>
1 parent 2f481f7 commit 4422269

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/parallel/test-http-proxy.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ const proxy = http.createServer(function(req, res) {
5050

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

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

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

@@ -79,11 +79,11 @@ function startReq() {
7979
path: '/test'
8080
}, function(res) {
8181
console.error('got res');
82-
assert.strictEqual(200, res.statusCode);
82+
assert.strictEqual(res.statusCode, 200);
8383

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

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

0 commit comments

Comments
 (0)