ReviewOS

also looking at this

stacks/tuf-js

fix: restore HTTP interception between Jest environments

#2
Merged chris wants to merge codex/repo-mock-http-ci into main
2 files +10 -0
packages/repo-mock/tests/setup.tsadded+9-0
Changes to packages/repo-mock/tests/setup.ts
@@ -0,0 +1,9 @@
1import nock from 'nock';
2
3// Built-in HTTP modules survive Jest environments reused in the same worker.
4// Restore Nock before that environment is disposed, so the next one owns its hooks.
5afterAll(() => {
6 nock.abortPendingRequests();
7 nock.cleanAll();
8 nock.restore();
9});