Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: correct labelling of asserts errors #23531

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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