test(ivy): verify equality of ngBaseDef metadata between compiler and core (#31210)

There's no build time dependency from @angular/core to @angular/compiler,
so core can't directly refer to compiler types. To overcome this limitation,
there's a facade layer defined in the compiler and duplicated in core,
such that during runtime all types will correctly align.

There's a testcase in the compiler that verifies that all such facade types
are compatible across core and compiler, such that the core types can't get
misaligned with the actual definitions in the compiler. This suite of
tests were missing the `R3BaseMetadataFacade` facade type, so it was possible
for this type to get out of sync.

PR Close #31210
This commit is contained in:
JoostK 2019-06-22 20:11:44 +02:00 committed by Alex Rickabaugh
parent eb6281f5b4
commit dca713c087
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ const coreR3ComponentMetadataFacade: core.R3ComponentMetadataFacade =
const compilerR3ComponentMetadataFacade: compiler.R3ComponentMetadataFacade =
null !as core.R3ComponentMetadataFacade;
const coreR3BaseMetadataFacade: core.R3BaseMetadataFacade = null !as compiler.R3BaseMetadataFacade;
const compilerR3BaseMetadataFacade: compiler.R3BaseMetadataFacade =
null !as core.R3BaseMetadataFacade;
const coreViewEncapsulation: core.ViewEncapsulation = null !as compiler.ViewEncapsulation;
const compilerViewEncapsulation: compiler.ViewEncapsulation = null !as core.ViewEncapsulation;