MCPcopy
hub / github.com/vitest-dev/vitest / callFixtureCleanup

Function callFixtureCleanup

packages/runner/src/fixture.ts:245–251  ·  view source on GitHub ↗
(context: object)

Source from the content-addressed store, hash-verified

243>()
244
245export async function callFixtureCleanup(context: object): Promise<void> {
246 const cleanupFnArray = cleanupFnArrayMap.get(context) ?? []
247 for (const cleanup of cleanupFnArray.reverse()) {
248 await cleanup()
249 }
250 cleanupFnArrayMap.delete(context)
251}
252
253/**
254 * Returns the current number of cleanup functions registered for the context.

Callers 3

runTestFunction · 0.90
runSuiteFunction · 0.90
startTestsFunction · 0.90

Calls 3

cleanupFunction · 0.50
getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected