Skip to content

Commit 706768d

Browse files
authored
fix(node-http-handler): set maxSockets above 0 in test (#1660)
1 parent eb50962 commit 706768d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/node-http-handler/src/node-http-handler.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ import {
1818
describe("NodeHttpHandler", () => {
1919
describe("constructor", () => {
2020
it("can set httpAgent and httpsAgent", () => {
21-
let maxSockets = Math.round(Math.random() * 50);
21+
let maxSockets = Math.round(Math.random() * 50) + 1;
2222
let nodeHttpHandler = new NodeHttpHandler({
2323
httpAgent: new http.Agent({ maxSockets }),
2424
});
2525
expect((nodeHttpHandler as any).httpAgent.maxSockets).toEqual(maxSockets);
26-
maxSockets = Math.round(Math.random() * 50);
26+
maxSockets = Math.round(Math.random() * 50) + 1;
2727
nodeHttpHandler = new NodeHttpHandler({
2828
httpsAgent: new https.Agent({ maxSockets }),
2929
});

0 commit comments

Comments
 (0)