Skip to content

Commit 625ed49

Browse files
committed
test: remove disableTypeScriptVersionCheck from tests setup
This option causes our CI to be green even when new projects are created with mismatching TypeScript versions, which causes failures in a real-world project. See #22333 for more context. (cherry picked from commit fb3b1fe)
1 parent 1ddbd75 commit 625ed49

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

tests/legacy-cli/e2e/setup/500-create-project.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { setRegistry as setNPMConfigRegistry } from '../utils/packages';
66
import { ng, npm } from '../utils/process';
77
import { prepareProjectForE2e, updateJsonFile } from '../utils/project';
88

9-
export default async function() {
9+
export default async function () {
1010
const argv = getGlobalVariable('argv');
1111

1212
if (argv.noproject) {
@@ -28,15 +28,6 @@ export default async function() {
2828
await expectFileToExist(join(process.cwd(), 'test-project'));
2929
process.chdir('./test-project');
3030

31-
// Disable the TS version check to make TS updates easier.
32-
// Only VE does it, but on Ivy the i18n extraction uses VE.
33-
await updateJsonFile('tsconfig.json', config => {
34-
if (!config.angularCompilerOptions) {
35-
config.angularCompilerOptions = {};
36-
}
37-
config.angularCompilerOptions.disableTypeScriptVersionCheck = true;
38-
});
39-
4031
// If on CI, the user configuration set above will handle project usage
4132
if (!isCI) {
4233
// Ensure local test registry is used inside a project

tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ import { updateJsonFile } from '../../utils/project';
44
import { expectToFail } from '../../utils/utils';
55
import { externalServer, langTranslations, setupI18nConfig } from './setup';
66

7-
export default async function() {
7+
export default async function () {
88
// Setup i18n tests and config.
99
await setupI18nConfig();
1010

1111
// Ensure a es2017 build is used.
1212
await writeFile('.browserslistrc', 'Chrome 65');
13-
await updateJsonFile('tsconfig.json', config => {
13+
await updateJsonFile('tsconfig.json', (config) => {
1414
config.compilerOptions.target = 'es2017';
15-
if (!config.angularCompilerOptions) {
16-
config.angularCompilerOptions = {};
17-
}
18-
config.angularCompilerOptions.disableTypeScriptVersionCheck = true;
1915
});
2016

2117
await ng('build', '--source-map');

0 commit comments

Comments
 (0)