test(core): remove "enableIvy" compiler option from migration tests (#32954)

ec4381d explicitly set `enableIvy: false` for all migrations inside
the core package. This actually hides migration issues because the
migration itself should ensure that it instantiates the right
compiler program if it relies on `@angular/compiler-cli`.

We should remove these options from all migration tests to
ensure that we catch issues with migrations running in version
9 where Ivy is enabled by default.

e.g. e5636a322c
was accidentally hidden due to the `enableIvy: false` option.

PR Close #32954
This commit is contained in:
Paul Gschwendtner 2019-10-02 11:47:42 +02:00 committed by atscott
parent 7503e3540d
commit 90dda5873a
10 changed files with 3 additions and 19 deletions

View File

@ -26,10 +26,7 @@ describe('Google3 explicitQueryTiming TSLint rule', () => {
tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test'); tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test');
shx.mkdir('-p', tmpDir); shx.mkdir('-p', tmpDir);
writeFile( writeFile('tsconfig.json', JSON.stringify({compilerOptions: {module: 'es2015'}}));
'tsconfig.json',
JSON.stringify(
{compilerOptions: {module: 'es2015'}, angularCompilerOptions: {enableIvy: false}}));
}); });
afterEach(() => shx.rm('-r', tmpDir)); afterEach(() => shx.rm('-r', tmpDir));

View File

@ -21,10 +21,7 @@ describe('Google3 missing injectable tslint rule', () => {
tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test'); tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test');
shx.mkdir('-p', tmpDir); shx.mkdir('-p', tmpDir);
writeFile( writeFile('tsconfig.json', JSON.stringify({compilerOptions: {module: 'es2015'}}));
'tsconfig.json',
JSON.stringify(
{compilerOptions: {module: 'es2015'}, angularCompilerOptions: {enableIvy: false}}));
}); });
afterEach(() => shx.rm('-r', tmpDir)); afterEach(() => shx.rm('-r', tmpDir));

View File

@ -21,10 +21,7 @@ describe('Google3 noTemplateVariableAssignment TSLint rule', () => {
tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test'); tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test');
shx.mkdir('-p', tmpDir); shx.mkdir('-p', tmpDir);
writeFile( writeFile('tsconfig.json', JSON.stringify({compilerOptions: {module: 'es2015'}}));
'tsconfig.json',
JSON.stringify(
{compilerOptions: {module: 'es2015'}, angularCompilerOptions: {enableIvy: false}}));
}); });
afterEach(() => shx.rm('-r', tmpDir)); afterEach(() => shx.rm('-r', tmpDir));

View File

@ -35,7 +35,6 @@ describe('Google3 Renderer to Renderer2 TSLint rule', () => {
'@angular/core': ['angular.d.ts'], '@angular/core': ['angular.d.ts'],
} }
}, },
angularCompilerOptions: {enableIvy: false}
})); }));
}); });

View File

@ -30,7 +30,6 @@ describe('Missing injectable migration', () => {
experimentalDecorators: true, experimentalDecorators: true,
lib: ['es2015'], lib: ['es2015'],
}, },
angularCompilerOptions: {enableIvy: false}
})); }));
writeFile('/angular.json', JSON.stringify({ writeFile('/angular.json', JSON.stringify({
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}} projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}

View File

@ -28,7 +28,6 @@ describe('move-document migration', () => {
compilerOptions: { compilerOptions: {
lib: ['es2015'], lib: ['es2015'],
}, },
angularCompilerOptions: {enableIvy: false}
})); }));
writeFile('/angular.json', JSON.stringify({ writeFile('/angular.json', JSON.stringify({
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}} projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}

View File

@ -29,7 +29,6 @@ describe('Renderer to Renderer2 migration', () => {
lib: ['es2015'], lib: ['es2015'],
strictNullChecks: true, strictNullChecks: true,
}, },
angularCompilerOptions: {enableIvy: false}
})); }));
writeFile('/angular.json', JSON.stringify({ writeFile('/angular.json', JSON.stringify({
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}} projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}

View File

@ -35,7 +35,6 @@ describe('static-queries migration with usage strategy', () => {
compilerOptions: { compilerOptions: {
lib: ['es2015'], lib: ['es2015'],
}, },
angularCompilerOptions: {enableIvy: false}
})); }));
writeFile('/angular.json', JSON.stringify({ writeFile('/angular.json', JSON.stringify({
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}} projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}

View File

@ -29,7 +29,6 @@ describe('template variable assignment migration', () => {
compilerOptions: { compilerOptions: {
lib: ['es2015'], lib: ['es2015'],
}, },
angularCompilerOptions: {enableIvy: false}
})); }));
writeFile('/angular.json', JSON.stringify({ writeFile('/angular.json', JSON.stringify({
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}} projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}

View File

@ -1308,7 +1308,6 @@ describe('Undecorated classes with DI migration', () => {
generateCodeForLibraries: false, generateCodeForLibraries: false,
allowEmptyCodegenFiles: true, allowEmptyCodegenFiles: true,
enableSummariesForJit: true, enableSummariesForJit: true,
enableIvy: false,
} }
})); }));