hunk.code_window: import { experimental, json, logging } from '@angular-devkit/core';
   import { EMPTY, Subscription } from 'rxjs';
   import { catchError, first, ignoreElements, map, share, shareReplay, tap } from 'rxjs/operators';
   import {
     BuilderInfo,
     BuilderInput,
     BuilderOutput, BuilderProgressReport,
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit: import { Analytics, AnalyticsReport, AnalyticsReporter } from '../../core/src/analytics';
  
hunk.file_path: packages/angular_devkit/architect/src/schedule-by-name.ts
hunk.type: add
file: /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  import { Architect } from '@angular-devkit/architect/src/index2';
  import { browserBuild, createArchitect, host } from '../utils';
  
  
  describe('Browser Builder stats json', () => {
    const target = { project: 'app', target: 'build' };
    let architect: Architect;
  
    beforeEach(async () => {
      await host.initialize().toPromise();
      architect = (await createArchitect(host.root())).architect;
    });
    afterEach(async () => host.restore().toPromise());
  
    it('works', async () => {
      const { files } = await browserBuild(architect, host, target, { statsJson: true });
      expect('stats.json' in files).toBe(true);
    });
  
    it('works with profile flag', async () => {
      const { files } = await browserBuild(architect, host, target, { statsJson: true });
      expect('stats.json' in files).toBe(true);
      const stats = await files['stats.json'];
      expect(stats).toMatch(/profile.+building/);
    });
  });
  