Files
2026-07-13 12:30:28 +08:00

16 lines
289 B
TypeScript

import { afterAll, afterEach, beforeAll } from 'vitest';
import nock from 'nock';
beforeAll(() => {
nock.disableNetConnect();
nock.enableNetConnect((host) => host.startsWith('127.0.0.1'));
});
afterEach(() => {
nock.cleanAll();
});
afterAll(() => {
nock.enableNetConnect();
});