MCPcopy Create free account
hub / github.com/angular/components / createTestProject

Function createTestProject

src/cdk/schematics/testing/test-project.ts:13–36  ·  view source on GitHub ↗
(
  runner: SchematicTestRunner,
  projectType: 'application' | 'library',
  appOptions = {},
  tree?: Tree,
)

Source from the content-addressed store, hash-verified

11
12/** Create a base project used for testing. */
13export async function createTestProject(
14 runner: SchematicTestRunner,
15 projectType: 'application' | 'library',
16 appOptions = {},
17 tree?: Tree,
18): Promise<UnitTestTree> {
19 const workspaceTree = await runner.runExternalSchematic(
20 '@schematics/angular',
21 'workspace',
22 {
23 name: 'workspace',
24 version: '6.0.0',
25 newProjectRoot: 'projects',
26 },
27 tree,
28 );
29
30 return runner.runExternalSchematic(
31 '@schematics/angular',
32 projectType,
33 {name: 'material', ...appOptions},
34 workspaceTree,
35 );
36}

Callers 2

createTestLibraryFunction · 0.90
createTestAppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected