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

Method onClose

packages/vitest/src/node/core.ts:1612–1614  ·  view source on GitHub ↗

* Register a handler that will be called when the server is closed.

(fn: () => Awaitable<void>)

Source from the content-addressed store, hash-verified

1610 * Register a handler that will be called when the server is closed.
1611 */
1612 onClose(fn: () => Awaitable<void>): void {
1613 this._onClose.push(fn)
1614 }
1615
1616 /**
1617 * Register a handler that will be called when the tests are rerunning.

Callers 5

addCleanupListenersMethod · 0.80
onInitMethod · 0.80
onInitMethod · 0.80
runVitestFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected