hunk.code_window:  */
   import * as fs from 'fs';
   import { resolve } from 'path';
   /**
    * Delete an output directory, but error out if it's the root of the project.
  
hunk.labels: keep keep keep replace keep keep keep
hunk.after_edit: import { join, resolve } from 'path';
  
hunk.file_path: packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts
hunk.type: replace
file: import { ng } from '../../utils/process';
  import { writeFile } from '../../utils/fs';
  
  export default async function () {
    await writeFile(
      'src/app/app.component.spec.ts',
      `
    import { TestBed } from '@angular/core/testing';
    import { AppComponent } from './app.component';
  
    describe('AppComponent', () => {
      beforeAll(() => {
        jasmine.clock().install();
      });
  
      afterAll(() => {
        jasmine.clock().uninstall();
      });
  
      beforeEach(() => TestBed.configureTestingModule({
        imports: [AppComponent]
      }));
  
      it('should create the app', () => {
        const fixture = TestBed.createComponent(AppComponent);
        expect(fixture.componentInstance).toBeTruthy();
      });
    });
    `,
    );
  
    await ng('test', '--watch=false');
  }
  