hunk.code_window:       export function funky(value: number): number {
           return value + 1;
         }
       `))
       // Should trigger a rebuild, this time an error is expected.
       .then(() => waitForAnyProcessOutputToMatch(doneRe, 5000))
       .then(({ stdout }) => {
         if (!/ERROR in .*\/src\/main\.ts \(/.test(stdout)) {
           throw new Error('Expected an error but none happened.');
         }
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.after_edit:     .then(() => waitForAnyProcessOutputToMatch(doneRe, 10000))
  
hunk.file_path: tests/e2e/tests/build/rebuild-deps-type-check.ts
hunk.type: replace
file: 'use strict';
  
  const ng = require('../helpers/ng');
  const tmp = require('../helpers/tmp');
  
  const existsSync = require('exists-sync');
  const expect = require('chai').expect;
  const path = require('path');
  const root = process.cwd();
  
  const testPath = path.join(root, 'tmp', 'foo', 'src', 'app');
  
  describe('Acceptance: ng generate class', function () {
    beforeEach(function () {
      this.timeout(10000);
      return tmp.setup('./tmp').then(function () {
        process.chdir('./tmp');
      }).then(function () {
        return ng(['new', 'foo', '--skip-npm']);
      });
    });
  
    afterEach(function () {
      return tmp.teardown('./tmp');
    });
  
    it('ng generate class my-class', function () {
      return ng(['generate', 'class', 'my-class']).then(() => {
        expect(existsSync(path.join(testPath, 'my-class.ts'))).to.equal(true);
        expect(existsSync(path.join(testPath, 'my-class.spec.ts'))).to.equal(false);
      });
    });
  
    it('ng generate class my-class --no-spec', function () {
      return ng(['generate', 'class', 'my-class', '--no-spec']).then(() => {
        expect(existsSync(path.join(testPath, 'my-class.ts'))).to.equal(true);
        expect(existsSync(path.join(testPath, 'my-class.spec.ts'))).to.equal(false);
      });
    });
  
    it('ng generate class my-class.model', function () {
      return ng(['generate', 'class', 'my-class.model']).then(() => {
        expect(existsSync(path.join(testPath, 'my-class.model.ts'))).to.equal(true);
      });
    });
  });
  