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

MockBuikder: RouterModule.forChild and multiple components #178

Closed
cdupetit opened this issue Aug 7, 2020 · 4 comments · Fixed by #179
Closed

MockBuikder: RouterModule.forChild and multiple components #178

cdupetit opened this issue Aug 7, 2020 · 4 comments · Fixed by #179
Assignees
Labels
bug Something isn't working

Comments

@cdupetit
Copy link

cdupetit commented Aug 7, 2020

Hi @satanTime,
When I use MockBuilder to test a XComponent included in a RouterModule.forChild route with a YComponent.
I get this error :

Error: Component YComponent is not part of any NgModule or the module has not been imported into your module.

To remove error, I should mock the YComponent manually.
You can see the error in StackBlitz.
The code works fine in production.

angular.json
Production :
projects -> demo -> architect -> build -> options -> main -> src/main.ts
Testing :
projects -> demo -> architect -> build -> options -> main -> src/main-testing.ts

Thanks in advance.
Best regards.
Cyril

@satanTime
Copy link
Member

Hi again,

I hope you are doing great.

Thanks for the report. I'll take a look this weekend and release an update on Sunday.

@satanTime satanTime self-assigned this Aug 7, 2020
@satanTime satanTime added the bug Something isn't working label Aug 7, 2020
@cdupetit
Copy link
Author

cdupetit commented Aug 7, 2020

I'm on vacation for two weeks starting tonight. So I could not test before my return.

@satanTime
Copy link
Member

No worries, take your time and have fun!

@cdupetit
Copy link
Author

cdupetit commented Aug 7, 2020

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants