From 3b33045cc7fda22cca343f52c2fa60fdd698fe6e Mon Sep 17 00:00:00 2001 From: ukrukarg Date: Wed, 19 Jun 2019 14:51:52 -0400 Subject: [PATCH 1/2] feat(@angular-devkit/schematics): Add registerCollection to SchematicsTestRunner Fixes #14833 --- .../schematics/testing/schematic-test-runner.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 9b89f6f46057..02d12c4ff2ca 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -72,6 +72,10 @@ export class SchematicTestRunner { get logger(): logging.Logger { return this._logger; } get tasks(): TaskConfiguration[] { return [...this._engineHost.tasks]; } + registerCollection(collectionName: string, collectionPath: string) { + this._engineHost.registerCollection(collectionName, collectionPath); + } + runSchematicAsync( schematicName: string, opts?: SchematicSchemaT, From 1c018b91784a8ab74e06ff88271b88e905b9cafe Mon Sep 17 00:00:00 2001 From: ukrukarg Date: Wed, 19 Jun 2019 14:51:52 -0400 Subject: [PATCH 2/2] feat(@angular-devkit/schematics): Add registerCollection to SchematicsTestRunner Fixes #14833 --- etc/api/angular_devkit/schematics/testing/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/api/angular_devkit/schematics/testing/index.d.ts b/etc/api/angular_devkit/schematics/testing/index.d.ts index b2fd06c700a4..14148f616992 100644 --- a/etc/api/angular_devkit/schematics/testing/index.d.ts +++ b/etc/api/angular_devkit/schematics/testing/index.d.ts @@ -4,6 +4,7 @@ export declare class SchematicTestRunner { readonly tasks: TaskConfiguration[]; constructor(_collectionName: string, collectionPath: string); callRule(rule: Rule, tree: Tree, parentContext?: Partial): Observable; + registerCollection(collectionName: string, collectionPath: string): void; runExternalSchematic(collectionName: string, schematicName: string, opts?: SchematicSchemaT, tree?: Tree): UnitTestTree; runExternalSchematicAsync(collectionName: string, schematicName: string, opts?: SchematicSchemaT, tree?: Tree): Observable; runSchematic(schematicName: string, opts?: SchematicSchemaT, tree?: Tree): UnitTestTree;