Skip to content

Commit c388c64

Browse files
chore(tests): don’t keep HTTP connections alive (#645)
This change almost halves the time it takes to run `tests/main.test.ts`.
1 parent 12e77e5 commit c388c64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/_registryServer.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ function generateVersionMetadata(packageName, version) {
111111
const TOKEN_MOCK = `SOME_DUMMY_VALUE`;
112112

113113
const server = createServer((req, res) => {
114+
res.setHeader(`connection`, `close`);
115+
114116
const auth = req.headers.authorization;
115117

116118
if (

0 commit comments

Comments
 (0)