test(compiler-cli): default `enableI18nLegacyMessageIdFormat` to false in compliance tests (#39707)

In production mode this flag defaults to `true`, but the compliance
tests override this to `false` unless it is provided. As such, the
linker should also adhere to this default as otherwise the compilation
output would not align with the output of the full tests.

There are still tests that exercise the value of this flag, together
with it being `undefined` to verify the behavior of the actual default
value.

PR Close #39707
This commit is contained in:
JoostK 2020-11-16 18:16:07 +01:00 committed by Andrew Kushnir
parent f4690cb527
commit f6be161a3c
1 changed files with 3 additions and 2 deletions

View File

@ -29,8 +29,9 @@ const linkedCompile: CompileFn = (data, angularFiles, options) => {
const compiledFiles = compileFiles(data, angularFiles, {...options, compilationMode: 'partial'});
const linkerPlugin = createEs2015LinkerPlugin({
enableI18nLegacyMessageIdFormat: options?.enableI18nLegacyMessageIdFormat,
i18nNormalizeLineEndingsInICUs: options?.i18nNormalizeLineEndingsInICUs,
// enableI18nLegacyMessageIdFormat defaults to false in `compileFiles`.
enableI18nLegacyMessageIdFormat: false,
...options,
});
const source = compiledFiles.map(file => applyLinker(file, linkerPlugin)).join('\n');