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

Method createSpecification

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

* Creates a new test specification. Specifications describe how to run tests. * @param moduleId The file path

(
    moduleId: string,
    locationsOrOptions?: number[] | TestSpecificationOptions | undefined,
    /** @internal */
    pool?: string,
  )

Source from the content-addressed store, hash-verified

148 * @param moduleId The file path
149 */
150 public createSpecification(
151 moduleId: string,
152 locationsOrOptions?: number[] | TestSpecificationOptions | undefined,
153 /** @internal */
154 pool?: string,
155 ): TestSpecification {
156 return new TestSpecification(
157 this,
158 moduleId,
159 pool || getFilePoolName(this),
160 locationsOrOptions,
161 )
162 }
163
164 public toJSON(): SerializedTestProject {
165 return {

Callers 11

mergeReportsMethod · 0.80
toTestSpecificationMethod · 0.80
toTestSpecificationMethod · 0.80
toTestSpecificationMethod · 0.80
pre-parse.test.tsFile · 0.80
test-tags.test.tsFile · 0.80
collectTestModuleFunction · 0.80

Calls 1

getFilePoolNameFunction · 0.90

Tested by 1

collectTestModuleFunction · 0.64