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

jest & ivy - entryComponents required #17242

Closed
pburkindine opened this issue Mar 17, 2020 · 1 comment
Closed

jest & ivy - entryComponents required #17242

pburkindine opened this issue Mar 17, 2020 · 1 comment

Comments

@pburkindine
Copy link

pburkindine commented Mar 17, 2020

I am re-opening this as the recommended workaround (postinstall: ngcc --properties main) is causing previously-working tests to fail.

The tests that fail are for instance simple tests that a pipe from ngrx is correctly stopping on destroy$ subject emit. The tests have been checked carefully that the destroy$ subject is firing and the stream keeps emitting.

My guess is that there is some difference between the compiled code from the main target (which compiles to UMD) and the es2015 target.

I am not understanding why the recommended postinstall hook (ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points) would result in entryComponents being required and ViewEngine being used for tests.

I am working on a repro which I will add here in a while.


ref: #17110

We are having to declare entryComponents in tests after upgrading to A9; the documentation indicates this should not be necessary


@NgModule({
  entryComponents: [
    xyz,
  ]
})
export class ImportModule {}
 beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [RouterTestingModule, ImportModule],
...
@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 Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant