Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/legacy-cli/e2e/initialize/500-create-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ export default async function () {
namedChunks: true,
buildOptimizer: false,
};

const serve = json['projects']['test-project']['architect']['serve'];
serve.builder = '@angular-devkit/build-angular:dev-server';

const extract = json['projects']['test-project']['architect']['extract-i18n'];
if (extract) {
extract.builder = '@angular-devkit/build-angular:extract-i18n';
}

const test = json['projects']['test-project']['architect']['test'];
test.builder = '@angular-devkit/build-angular:karma';
});
await updateJsonFile('tsconfig.json', (tsconfig) => {
delete tsconfig.compilerOptions.esModuleInterop;
Expand Down
3 changes: 3 additions & 0 deletions tests/legacy-cli/e2e/tests/build/jit-ngmodule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export default async function () {
};

build.options.aot = false;

const serve = json['projects']['test-project-two']['architect']['serve'];
serve.builder = '@angular-devkit/build-angular:dev-server';
});
// Test it works
await ng('e2e', 'test-project-two', '--configuration=production');
Expand Down
3 changes: 3 additions & 0 deletions tests/legacy-cli/e2e/tests/build/rebuild-dot-dirname.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export default async function () {
namedChunks: true,
buildOptimizer: false,
};

const serve = json['projects']['subdirectory-test-project']['architect']['serve'];
serve.builder = '@angular-devkit/build-angular:dev-server';
});
}

Expand Down
7 changes: 3 additions & 4 deletions tests/legacy-cli/e2e/tests/commands/add/version-specifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function () {
await appendFile('.npmrc', '\nforce=true\n');
}

const tag = (await isPrereleaseCli()) ? '@next' : '';
const tag = isPrereleaseCli() ? '@next' : '';

await ng('add', `@angular/localize${tag}`, '--skip-confirmation');
await expectFileToMatch('package.json', /@angular\/localize/);
Expand All @@ -30,13 +30,12 @@ export default async function () {
throw new Error('Installation should not have been skipped');
}

// v12.2.0 has a package.json engine field that supports Node.js v16+
const output3 = await ng('add', '@angular/[email protected]', '--skip-confirmation');
const output3 = await ng('add', '@angular/[email protected]', '--skip-confirmation');
if (output3.stdout.includes('Skipping installation: Package already installed')) {
throw new Error('Installation should not have been skipped');
}

const output4 = await ng('add', '@angular/localize@12', '--skip-confirmation');
const output4 = await ng('add', '@angular/localize@19', '--skip-confirmation');
if (!output4.stdout.includes('Skipping installation: Package already installed')) {
throw new Error('Installation was not skipped');
}
Expand Down
4 changes: 2 additions & 2 deletions tests/legacy-cli/e2e/tests/test/test-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export default function () {
production: {
fileReplacements: [
{
src: 'src/environment.ts',
replaceWith: 'src/environment.prod.ts',
replace: 'src/environment.ts',
with: 'src/environment.prod.ts',
},
],
},
Expand Down