close()
Cleans up any augmented native request issuing classes and stops request interception.
Examples
It's recommended to call .close()
after all test suites to clean up and prevent the current interception layer from affecting irrelevant tests.
1import { setupServer } from 'msw/node'23const server = setupServer(...)45beforeAll(() => server.listen())6afterAll(() => server.close())