hunk.code_window:   works: 'everywhere',
     availableOptions: [],
     run: function (commandOptions: any) {
       let commandFiles = fs.readdirSync(__dirname)
         // Remove files that are not JavaScript or Typescript
         .filter(file => file.match(/\.(j|t)s$/) && !file.match(/\.d.ts$/))
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit:   run: function (commandOptions: any, rawArgs: any) {
  
hunk.file_path: packages/angular-cli/commands/help.ts
hunk.type: replace
file: const path = require('path');
  const getWebpackTestConfig = require('../models/webpack-build-test').getWebpackTestConfig;
  
  const init = (config) => {
  
    // load Angular CLI config
    if (!config.angularCli || !config.angularCli.config) {
      throw new Error('Missing \'angularCli.config\' entry in Karma config');
    }
    const angularCliConfig = require(path.join(config.basePath, config.angularCli.config));
    const appConfig = angularCliConfig.apps[0];
    const environment = config.angularCli.environment || 'dev';
  
    // add webpack config
    const webpackConfig = getWebpackTestConfig(config.basePath, environment, appConfig);
    const webpackMiddlewareConfig = {
      noInfo: true, // Hide webpack output because its noisy.
      stats: { // Also prevent chunk and module display output, cleaner look. Only emit errors.
        assets: false,
        colors: true,
        version: false,
        hash: false,
        timings: false,
        chunks: false,
        chunkModules: false
      }
    };
    config.webpack = Object.assign(webpackConfig, config.webpack);
    config.webpackMiddleware = Object.assign(webpackMiddlewareConfig, config.webpackMiddleware);
  
    // replace the angular-cli preprocessor with webpack+sourcemap
    Object.keys(config.preprocessors)
      .filter((file) => config.preprocessors[file].indexOf('angular-cli') !== -1)
      .map((file) => config.preprocessors[file])
      .map((arr) => arr.splice(arr.indexOf('angular-cli'), 1, 'webpack', 'sourcemap'));
  }
  
  init.$inject = ['config']
  
  // dummy preprocessor, just to keep karma from showing a warning
  const preprocessor = () => (content, file, done) => done(null, content);
  preprocessor.$inject = []
  
  // also export karma-webpack and karma-sourcemap-loader
  module.exports = Object.assign({
    'framework:angular-cli': ['factory', init],
    'preprocessor:angular-cli': ['factory', preprocessor]
  }, require('karma-webpack'), require('karma-sourcemap-loader'));