Skip to content

Commit 561ac4c

Browse files
szabolcsitcodebytere
szabolcsit
authored andcommitted
test: fix arguments order in assert.strictEqual
In the test test/parallel/test-http-client-upload.js test the actual and expected arguments in assert.strictEqual() calls were in the wrong order. Switched them around so the returned value by the function is the first argument and the literal value is the second argument. PR-URL: #24143 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 0e5fe9a commit 561ac4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-http-client-upload.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const assert = require('assert');
2525
const http = require('http');
2626

2727
const server = http.createServer(common.mustCall(function(req, res) {
28-
assert.strictEqual('POST', req.method);
28+
assert.strictEqual(req.method, 'POST');
2929
req.setEncoding('utf8');
3030

3131
let sent_body = '';
@@ -36,7 +36,7 @@ const server = http.createServer(common.mustCall(function(req, res) {
3636
});
3737

3838
req.on('end', common.mustCall(function() {
39-
assert.strictEqual('1\n2\n3\n', sent_body);
39+
assert.strictEqual(sent_body, '1\n2\n3\n');
4040
console.log('request complete from server');
4141
res.writeHead(200, { 'Content-Type': 'text/plain' });
4242
res.write('hello\n');

0 commit comments

Comments
 (0)