angular-cn/packages/core/testing/src
crisbeto 5b864ede13 fix(ivy): TestBed not unwrapping imports array function when overriding provider (#34629)
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 #34623.

PR Close #34629
2020-01-06 11:38:02 -08:00
..
async.ts docs: update core to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
async_fallback.ts refactor: utilize type narrowing (#33075) 2019-10-10 15:18:44 -07:00
async_test_completer.ts build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
before_each.ts docs: in doc comments, replace [aA]ngular2 with Angular (#15463) 2017-03-27 09:44:35 -07:00
component_fixture.ts docs: update core to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
fake_async.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
fake_async_fallback.ts refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
lang_utils.ts
logger.ts
metadata_override.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
metadata_overrider.ts refactor(core): replace instanceof Array (#33077) 2019-10-14 23:44:57 +00:00
ng_zone_mock.ts feat: add a flag in bootstrap to enable coalesce event change detection to improve performance (#30533) 2019-11-05 18:58:25 +00:00
private_export_testing.ts
r3_test_bed.ts revert: fix(ivy): R3TestBed should clean up registered modules after each test (#32872) (#33663) 2019-11-12 09:53:16 -08:00
r3_test_bed_compiler.ts fix(ivy): TestBed not unwrapping imports array function when overriding provider (#34629) 2020-01-06 11:38:02 -08:00
resolvers.ts fix(ivy): TestBed rewrite to avoid unnecessary recompilations (#29483) 2019-03-27 09:41:58 -07:00
test_bed.ts feat: add a flag in bootstrap to enable coalesce event change detection to improve performance (#30533) 2019-11-05 18:58:25 +00:00
test_bed_common.ts feat(core): Deprecate TestBed.get as deprecated (#32406) 2019-09-11 20:28:56 -04:00
test_compiler.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
testing.ts refactor(ivy): cleanup the public API for core/testing (#25492) 2018-08-15 09:53:17 -07:00
testing_internal.ts refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00