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

fix(ivy): TestBed not unwrapping imports array function when overriding provider #34629

Closed

Commits on Jan 3, 2020

  1. fix(ivy): TestBed not unwrapping imports array function when overridi…

    …ng provider
    
    Fixes an error that is thrown when a provider is overridden in `TestBed`, if the module definition of one of the imported modules uses a function for the `imports` that is set via `setNgModuleScope`. The problem was that we have a `for...of` loop that assumes that the imports are an array, but they can also be a function. This was handled correctly in other places, but this one was missed.
    
    Note that the above-mentioned error is only thrown at runtime when the code is transpiled to es6. In es5 TS generates a call to a helper that handles the error silently so the attached unit test only fails in es6.
    
    Fixes angular#34623.
    crisbeto committed Jan 3, 2020
    Copy the full SHA
    33fcef2 View commit details
    Browse the repository at this point in the history