From f6be161a3cbb995eedaadad91f7882ce75126409 Mon Sep 17 00:00:00 2001 From: JoostK Date: Mon, 16 Nov 2020 18:16:07 +0100 Subject: [PATCH] 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 --- .../compiler-cli/test/compliance_old/prelink/bootstrap.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/compiler-cli/test/compliance_old/prelink/bootstrap.ts b/packages/compiler-cli/test/compliance_old/prelink/bootstrap.ts index 9929c83afb..1682850877 100644 --- a/packages/compiler-cli/test/compliance_old/prelink/bootstrap.ts +++ b/packages/compiler-cli/test/compliance_old/prelink/bootstrap.ts @@ -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');