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

Method getProvidedContext

packages/vitest/src/node/project.ts:134–144  ·  view source on GitHub ↗

* Get the provided context. The project context is merged with the global context.

()

Source from the content-addressed store, hash-verified

132 * Get the provided context. The project context is merged with the global context.
133 */
134 getProvidedContext(): ProvidedContext {
135 if (this.isRootProject()) {
136 return this._provided
137 }
138 // globalSetup can run even if core workspace is not part of the test run
139 // so we need to inherit its provided context
140 return {
141 ...this.vitest.getRootProject().getProvidedContext(),
142 ...this._provided,
143 }
144 }
145
146 /**
147 * Creates a new test specification. Specifications describe how to run tests.

Callers 1

toJSONMethod · 0.95

Calls 2

isRootProjectMethod · 0.95
getRootProjectMethod · 0.80

Tested by

no test coverage detected