fix(compiler): don't convert undefined to null literals (#11503)
Fixes #11493
This commit is contained in:

committed by
vikerman

parent
051d74802a
commit
f0cdb428f5
@ -61,6 +61,15 @@ function declareTests({useJit}: {useJit: boolean}) {
|
||||
expect(fixture.nativeElement).toHaveText('');
|
||||
});
|
||||
|
||||
it('should allow both null and undefined in expressions', () => {
|
||||
const template = '<div>{{null == undefined}}|{{null === undefined}}</div>';
|
||||
const fixture = TestBed.configureTestingModule({declarations: [MyComp]})
|
||||
.overrideComponent(MyComp, {set: {template}})
|
||||
.createComponent(MyComp);
|
||||
fixture.detectChanges();
|
||||
expect(fixture.nativeElement).toHaveText('true|false');
|
||||
});
|
||||
|
||||
it('should consume element binding changes', () => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp]});
|
||||
const template = '<div [id]="ctxProp"></div>';
|
||||
|
Reference in New Issue
Block a user