(projectName = 'test-project')
| 129 | } |
| 130 | |
| 131 | export 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 | |
| 147 | export async function useCIChrome(projectName: string, projectDir = ''): Promise<void> { |
| 148 | const karmaConf = path.join(projectDir, 'karma.conf.js'); |
no test coverage detected