Skip to content

SchematicTestRunner: ability to register multiple collections #14833

Closed
@ukrukarg

Description

@ukrukarg

🚀 Feature request

Description

I am creating a schematic that overwrites existing Angular schematics. I do it like this:

  return chain([
    externalSchematic('angular', 'class', options, {interactive: true}),
   // other rules
  ]);

I am unable to test it using SchematicTestRunner because I can only register a single collection in it.

Describe the solution you'd like

I can make the test work by doing this:

const testRunner = new SchematicTestRunner(collectionUnderTest, path);
testRunner['_engineHost'].registerCollection(externalCollection, path);

I would like a registerCollection method on the SchematicTestRunner so I don't need to depend on private fields.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions