fix(ivy): taking "interpolation" config option into account (FW-723) (#27363)

PR Close #27363
This commit is contained in:
Andrew Kushnir
2018-11-29 16:21:16 -08:00
committed by Igor Minar
parent 159788685a
commit 8e644d99fc
14 changed files with 221 additions and 71 deletions

View File

@ -1295,27 +1295,26 @@ function declareTests(config?: {useJit: boolean}) {
expect(needsAttribute.fooAttribute).toBeNull();
});
fixmeIvy('FW-723: Custom interpolation markers are not supported') &&
it('should support custom interpolation', () => {
TestBed.configureTestingModule({
declarations: [
MyComp, ComponentWithCustomInterpolationA, ComponentWithCustomInterpolationB,
ComponentWithDefaultInterpolation
]
});
const template = `<div>{{ctxProp}}</div>
it('should support custom interpolation', () => {
TestBed.configureTestingModule({
declarations: [
MyComp, ComponentWithCustomInterpolationA, ComponentWithCustomInterpolationB,
ComponentWithDefaultInterpolation
]
});
const template = `<div>{{ctxProp}}</div>
<cmp-with-custom-interpolation-a></cmp-with-custom-interpolation-a>
<cmp-with-custom-interpolation-b></cmp-with-custom-interpolation-b>`;
TestBed.overrideComponent(MyComp, {set: {template}});
const fixture = TestBed.createComponent(MyComp);
TestBed.overrideComponent(MyComp, {set: {template}});
const fixture = TestBed.createComponent(MyComp);
fixture.componentInstance.ctxProp = 'Default Interpolation';
fixture.componentInstance.ctxProp = 'Default Interpolation';
fixture.detectChanges();
expect(fixture.nativeElement)
.toHaveText(
'Default InterpolationCustom Interpolation ACustom Interpolation B (Default Interpolation)');
});
fixture.detectChanges();
expect(fixture.nativeElement)
.toHaveText(
'Default InterpolationCustom Interpolation ACustom Interpolation B (Default Interpolation)');
});
});
describe('dependency injection', () => {