Skip to content

Commit

Permalink
fix(@schematics/angular): add spaces around eventCoalescing option
Browse files Browse the repository at this point in the history
The usual coding style in the generated application is to have spaces in objects (see `server.ts.template` for example).
  • Loading branch information
cexbrayat authored and alan-agius4 committed Mar 30, 2024
1 parent 508d97d commit 1573293
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { provideRouter } from '@angular/router';
import { routes } from './app.routes';<% } %>

export const appConfig: ApplicationConfig = {
providers: [provideZoneChangeDetection({eventCoalescing: true})<% if (routing) { %>, provideRouter(routes)<% } %>]
providers: [provideZoneChangeDetection({ eventCoalescing: true })<% if (routing) { %>, provideRouter(routes)<% } %>]
};
2 changes: 1 addition & 1 deletion packages/schematics/angular/application/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ describe('Application Schematic', () => {

const tree = await schematicRunner.runSchematic('application', options, workspaceTree);
const appConfig = tree.readContent('/projects/foo/src/app/app.config.ts');
expect(appConfig).toContain('provideZoneChangeDetection({eventCoalescing: true})');
expect(appConfig).toContain('provideZoneChangeDetection({ eventCoalescing: true })');
});

it('should create a standalone component', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ describe('standalone utilities', () => {
assertContains(content, `import { provideModule } from '@my/module';`);
assertContains(
content,
`providers: [provideZoneChangeDetection({eventCoalescing:true}),provideModule([])]`,
`providers: [provideZoneChangeDetection({ eventCoalescing:true }),provideModule([])]`,
);
});

Expand Down

0 comments on commit 1573293

Please sign in to comment.