Skip to content

Commit

Permalink
test: correct labelling of asserts errors
Browse files Browse the repository at this point in the history
PR-URL: #23531
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
nofwayy authored and MylesBorins committed Nov 29, 2018
1 parent b258b37 commit 04ec990
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-tls-over-http-tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ const proxy = net.createServer((clientSocket) => {
clientSocket.on('data', (chunk) => {
if (!serverSocket) {
// Verify the CONNECT request
assert.strictEqual(`CONNECT localhost:${server.address().port} ` +
assert.strictEqual(chunk.toString(),
`CONNECT localhost:${server.address().port} ` +
'HTTP/1.1\r\n' +
'Proxy-Connections: keep-alive\r\n' +
`Host: localhost:${proxy.address().port}\r\n` +
'Connection: close\r\n\r\n',
chunk.toString());
'Connection: close\r\n\r\n');

console.log('PROXY: got CONNECT request');
console.log('PROXY: creating a tunnel');
Expand Down Expand Up @@ -126,7 +126,7 @@ proxy.listen(0, common.mustCall(() => {
}

function onConnect(res, socket, header) {
assert.strictEqual(200, res.statusCode);
assert.strictEqual(res.statusCode, 200);
console.log('CLIENT: got CONNECT response');

// detach the socket
Expand All @@ -149,10 +149,10 @@ proxy.listen(0, common.mustCall(() => {
agent: false,
rejectUnauthorized: false
}, (res) => {
assert.strictEqual(200, res.statusCode);
assert.strictEqual(res.statusCode, 200);

res.on('data', common.mustCall((chunk) => {
assert.strictEqual('hello world\n', chunk.toString());
assert.strictEqual(chunk.toString(), 'hello world\n');
console.log('CLIENT: got HTTPS response');
gotRequest = true;
}));
Expand Down

0 comments on commit 04ec990

Please sign in to comment.