Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node/http(s)): export globalAgent #21081

Merged
merged 5 commits into from
Nov 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update http_test.ts
Signed-off-by: Jacob Hummer <[email protected]>
  • Loading branch information
jcbhmr committed Nov 8, 2023
commit 0acab1f5c271cc8ed50c19f6d9f5d696eafbef49
25 changes: 25 additions & 0 deletions cli/tests/unit_node/http_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,3 +811,28 @@ Deno.test(
await server.finished;
},
);

Deno.test("[node/http] node:http exports globalAgent", async () => {
const http = await import("node:https");
assert(
http.globalAgent,
"node:http must export 'globalAgent' on module namespace",
);
assert(
http.default.globalAgent,
"node:http must export 'globalAgent' on module default export",
);
});

Deno.test("[node/https] node:https exports globalAgent", async () => {
const https = await import("node:https");
assert(
https.globalAgent,
"node:https must export 'globalAgent' on module namespace",
);
assert(
https.default.globalAgent,
"node:https must export 'globalAgent' on module default export",
);
});