/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/schematics/testing/test-project.ts
36 строк
924 B
Naji
docs: replace angular.io links with angular.dev (#29734)
19 сен 2024, 13:57
Не верифицирован
19 сен 2024, 13:57
5782834
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/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: SchematicTestRunner, projectType: 'application' | 'library', appOptions = {}, tree?: Tree, ): Promise<UnitTestTree> { const workspaceTree = await runner.runExternalSchematic( '@schematics/angular', 'workspace', { name: 'workspace', version: '6.0.0', newProjectRoot: 'projects', }, tree, ); return runner.runExternalSchematic( '@schematics/angular', projectType, {name: 'material', ...appOptions}, workspaceTree, ); }