MCPcopy Index your code
hub / github.com/angular/angular-cli / useCIDefaults

Function useCIDefaults

tests/e2e/utils/project.ts:131–145  ·  view source on GitHub ↗
(projectName = 'test-project')

Source from the content-addressed store, hash-verified

129}
130
131export function useCIDefaults(projectName = 'test-project'): Promise<void> {
132 return updateJsonFile('angular.json', (workspaceJson) => {
133 // Disable progress reporting on CI to reduce spam.
134 const project = workspaceJson.projects[projectName];
135 const appTargets = project.targets || project.architect;
136 appTargets.build.options.progress = false;
137 appTargets.test.options.progress = false;
138
139 if (appTargets.serve) {
140 // Use a random port in serve.
141 appTargets.serve.options ??= {};
142 appTargets.serve.options.port = 0;
143 }
144 });
145}
146
147export async function useCIChrome(projectName: string, projectDir = ''): Promise<void> {
148 const karmaConf = path.join(projectDir, 'karma.conf.js');

Callers 5

update.tsFile · 0.90
module-basic.tsFile · 0.90
prepareProjectForE2eFunction · 0.85

Calls 1

updateJsonFileFunction · 0.70

Tested by

no test coverage detected