test: fix arguments order of comparsion functions
Place actual values as the first agruments and expected as the second. PR-URL: https://github.com/nodejs/node/pull/27907 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
parent
2d8367a5c3
commit
d6cc6ab037
@ -96,7 +96,7 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary');
|
|||||||
client.on('origin', mustCall((origins) => {
|
client.on('origin', mustCall((origins) => {
|
||||||
const check = checks.shift();
|
const check = checks.shift();
|
||||||
originSet.push(...check);
|
originSet.push(...check);
|
||||||
deepStrictEqual(originSet, client.originSet);
|
deepStrictEqual(client.originSet, originSet);
|
||||||
deepStrictEqual(origins, check);
|
deepStrictEqual(origins, check);
|
||||||
countdown.dec();
|
countdown.dec();
|
||||||
}, 2));
|
}, 2));
|
||||||
@ -121,7 +121,7 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary');
|
|||||||
|
|
||||||
client.on('origin', mustCall((origins) => {
|
client.on('origin', mustCall((origins) => {
|
||||||
originSet.push(...check);
|
originSet.push(...check);
|
||||||
deepStrictEqual(originSet, client.originSet);
|
deepStrictEqual(client.originSet, originSet);
|
||||||
deepStrictEqual(origins, check);
|
deepStrictEqual(origins, check);
|
||||||
client.close();
|
client.close();
|
||||||
server.close();
|
server.close();
|
||||||
@ -148,11 +148,11 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary');
|
|||||||
const client = connect(origin, { ca });
|
const client = connect(origin, { ca });
|
||||||
|
|
||||||
client.on('origin', mustCall((origins) => {
|
client.on('origin', mustCall((origins) => {
|
||||||
deepStrictEqual([origin, 'https://foo.org'], client.originSet);
|
deepStrictEqual(client.originSet, [origin, 'https://foo.org']);
|
||||||
const req = client.request({ ':authority': 'foo.org' });
|
const req = client.request({ ':authority': 'foo.org' });
|
||||||
req.on('response', mustCall((headers) => {
|
req.on('response', mustCall((headers) => {
|
||||||
strictEqual(421, headers[':status']);
|
strictEqual(headers[':status'], 421);
|
||||||
deepStrictEqual([origin], client.originSet);
|
deepStrictEqual(client.originSet, [origin]);
|
||||||
}));
|
}));
|
||||||
req.resume();
|
req.resume();
|
||||||
req.on('close', mustCall(() => {
|
req.on('close', mustCall(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user