(
runner: SchematicTestRunner,
projectType: 'application' | 'library',
appOptions = {},
tree?: Tree,
)
| 11 | |
| 12 | /** Create a base project used for testing. */ |
| 13 | export 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 | } |
no outgoing calls
no test coverage detected