license import { Tree } from '@angular-devkit/schematics' ; import { SchematicTestRunner , UnitTestTree } from '@angular-devkit/schematics/testing' ; /** Create a base project used for testing. */ export async function createTestProject ( runner , projectType , appOptions = { } , tree ? ) { const workspaceTree = await runner . runExternalSchematicAsync ( '@schematics/angular' , 'workspace' , { name : 'workspace' , version : '6.0.0' , newProjectRoot : 'projects' } , tree ) . toPromise ( ) ; return runner . runExternalSchematicAsync ( '@schematics/angular' , projectType , { name : 'material' , ... appOptions } , workspaceTree ) . toPromise ( ) ; }