Skip to content

Commit

Permalink
test: fix arguments order of comparsion functions
Browse files Browse the repository at this point in the history
Place actual values as the first agruments and expected as the second.

PR-URL: #27907
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
  • Loading branch information
m0rtyn authored and targos committed May 28, 2019
1 parent 728bc2f commit 652cadb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-http2-origin.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary');
client.on('origin', mustCall((origins) => {
const check = checks.shift();
originSet.push(...check);
deepStrictEqual(originSet, client.originSet);
deepStrictEqual(client.originSet, originSet);
deepStrictEqual(origins, check);
countdown.dec();
}, 2));
Expand All @@ -121,7 +121,7 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary');

client.on('origin', mustCall((origins) => {
originSet.push(...check);
deepStrictEqual(originSet, client.originSet);
deepStrictEqual(client.originSet, originSet);
deepStrictEqual(origins, check);
client.close();
server.close();
Expand All @@ -148,11 +148,11 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary');
const client = connect(origin, { ca });

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' });
req.on('response', mustCall((headers) => {
strictEqual(421, headers[':status']);
deepStrictEqual([origin], client.originSet);
strictEqual(headers[':status'], 421);
deepStrictEqual(client.originSet, [origin]);
}));
req.resume();
req.on('close', mustCall(() => {
Expand Down

0 comments on commit 652cadb

Please sign in to comment.