Skip to content

Commit d7166c1

Browse files
committed
refactor(cdk/schematics): remove deprecated utility usages (#27089)
Replaces the usages of `runExternalSchematicAsync` with `runExternalSchematic`. (cherry picked from commit aecb18a)
1 parent d2e8a55 commit d7166c1

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

src/cdk/schematics/testing/test-project.ts

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,21 @@ export async function createTestProject(
1616
appOptions = {},
1717
tree?: Tree,
1818
): Promise<UnitTestTree> {
19-
const workspaceTree = await runner
20-
.runExternalSchematicAsync(
21-
'@schematics/angular',
22-
'workspace',
23-
{
24-
name: 'workspace',
25-
version: '6.0.0',
26-
newProjectRoot: 'projects',
27-
},
28-
tree,
29-
)
30-
.toPromise();
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+
);
3129

32-
return runner
33-
.runExternalSchematicAsync(
34-
'@schematics/angular',
35-
projectType,
36-
{name: 'material', ...appOptions},
37-
workspaceTree,
38-
)
39-
.toPromise();
30+
return runner.runExternalSchematic(
31+
'@schematics/angular',
32+
projectType,
33+
{name: 'material', ...appOptions},
34+
workspaceTree,
35+
);
4036
}

0 commit comments

Comments
 (0)