Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SchematicTestRunner: ability to register multiple collections #14833

Closed
ukrukarg opened this issue Jun 19, 2019 · 1 comment · Fixed by #14835
Closed

SchematicTestRunner: ability to register multiple collections #14833

ukrukarg opened this issue Jun 19, 2019 · 1 comment · Fixed by #14835
Labels
area: devkit/schematics feature Issue that requests a new feature
Milestone

Comments

@ukrukarg
Copy link
Contributor

🚀 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.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: devkit/schematics feature Issue that requests a new feature
Projects
None yet
2 participants