angular/packages/core/testing/src
Andrew Kushnir 44bb85ade4 fix(core): reset tView between tests in Ivy TestBed (#38659)
`tView` that is stored on a component def contains information about directives and pipes
that are available in the scope of this component. Patching component scope causes `tView` to be
updated. Prior to this commit, the `tView` information was not restored/reset in case component
class is not declared in the `declarations` field while calling `TestBed.configureTestingModule`,
thus causing `tView` to be reused between tests (thus preserving scopes information between tests).
This commit updates TestBed logic to preserve `tView` value before applying scope changes and
reset it back to the previous state between tests.

Closes #38600.

PR Close #38659
2020-09-03 09:44:22 -07:00
..
async.ts feat(core): rename async to waitForAsync to avoid confusing (#37583) 2020-08-03 12:54:13 -07:00
async_fallback.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
async_test_completer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
before_each.ts build: fix broken build (#38274) 2020-07-28 12:30:59 -07:00
component_fixture.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
fake_async.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
fake_async_fallback.ts fix(core): fake_async_fallback should have the same logic with fake-async (#37680) 2020-06-29 12:22:52 -07:00
lang_utils.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
logger.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_override.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_overrider.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ng_zone_mock.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
private_export_testing.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
r3_test_bed.ts fix(core): cleanup DOM elements when root view is removed (#37600) 2020-06-25 14:34:35 -07:00
r3_test_bed_compiler.ts fix(core): reset tView between tests in Ivy TestBed (#38659) 2020-09-03 09:44:22 -07:00
resolvers.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
styling.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test_bed.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test_bed_common.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
testing.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
testing_internal.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00