test: fix assertion argument order
PR-URL: https://github.com/nodejs/node/pull/23489 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
039965085d
commit
d5824f8552
@ -47,8 +47,8 @@ server.on('listening', function() {
|
|||||||
http.get({ port: this.address().port, path: '/one' }, function(res) {
|
http.get({ port: this.address().port, path: '/one' }, function(res) {
|
||||||
// set-cookie headers are always return in an array.
|
// set-cookie headers are always return in an array.
|
||||||
// even if there is only one.
|
// even if there is only one.
|
||||||
assert.deepStrictEqual(['A'], res.headers['set-cookie']);
|
assert.deepStrictEqual(res.headers['set-cookie'], ['A']);
|
||||||
assert.strictEqual('text/plain', res.headers['content-type']);
|
assert.strictEqual(res.headers['content-type'], 'text/plain');
|
||||||
|
|
||||||
res.on('data', function(chunk) {
|
res.on('data', function(chunk) {
|
||||||
console.log(chunk.toString());
|
console.log(chunk.toString());
|
||||||
@ -62,8 +62,8 @@ server.on('listening', function() {
|
|||||||
// two set-cookie headers
|
// two set-cookie headers
|
||||||
|
|
||||||
http.get({ port: this.address().port, path: '/two' }, function(res) {
|
http.get({ port: this.address().port, path: '/two' }, function(res) {
|
||||||
assert.deepStrictEqual(['A', 'B'], res.headers['set-cookie']);
|
assert.deepStrictEqual(res.headers['set-cookie'], ['A', 'B']);
|
||||||
assert.strictEqual('text/plain', res.headers['content-type']);
|
assert.strictEqual(res.headers['content-type'], 'text/plain');
|
||||||
|
|
||||||
res.on('data', function(chunk) {
|
res.on('data', function(chunk) {
|
||||||
console.log(chunk.toString());
|
console.log(chunk.toString());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user