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

@ -683,6 +683,25 @@ describe('ngtsc behavioral tests', () => {
expect(jsContents).toContain('i18n(1, MSG_TEST_TS_0);');
});
it('@Component\'s `interpolation` should override default interpolation config', () => {
env.tsconfig();
env.write(`test.ts`, `
import {Component} from '@angular/core';
@Component({
selector: 'cmp-with-custom-interpolation-a',
template: \`<div>{%text%}</div>\`,
interpolation: ['{%', '%}']
})
class ComponentWithCustomInterpolationA {
text = 'Custom Interpolation A';
}
`);
env.driveMain();
const jsContents = env.getContents('test.js');
expect(jsContents).toContain('interpolation1("", ctx.text, "")');
});
it('should correctly recognize local symbols', () => {
env.tsconfig();
env.write('module.ts', `