hunk.code_window:     frameworks: ['jasmine', '@angular/cli'],
       plugins: [
         require('karma-jasmine'),
         require('karma-chrome-launcher'),
         require('karma-remap-istanbul'),
         require('@angular/cli/plugins/karma')
       ],
       files: [
         { pattern: './<%= sourceDir %>/test.ts', watched: false }
       ],
  
hunk.labels: keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:       require('karma-coverage-istanbul-reporter'),
  
hunk.file_path: packages/@angular/cli/blueprints/ng2/files/karma.conf.js
hunk.type: replace
file: 'use strict';
  var path          = require('path');
  
  // Main entry point
  var Project       = require('../models/project');
  var commands      = require('../commands');
  var tasks         = require('../tasks');
  var CLI           = require('./cli');
  var debug         = require('debug')('ember-cli:cli/index');
  
  
  // Options: Array cliArgs, Stream inputStream, Stream outputStream
  module.exports = function(options) {
    var UI = options.UI || require('../ui');
  
    // TODO: one UI (lib/models/project.js also has one for now...)
    var ui = new UI({
      inputStream:  options.inputStream,
      outputStream: options.outputStream,
      errorStream:  options.errorStream || process.stderr,
      errorLog:     options.errorLog || [],
      ci:           process.env.CI || /^(dumb|emacs)$/.test(process.env.TERM),
      writeLevel:   ~process.argv.indexOf('--silent') ? 'ERROR' : undefined
    });
  
  
    var defaultUpdateCheckerOptions = {
      checkForUpdates: false
    };
  
    var cli = new CLI({
      ui:        ui,
      testing:   options.testing,
      name: options.cli ? options.cli.name : 'ember',
      disableDependencyChecker: options.disableDependencyChecker,
      root: options.cli ? options.cli.root : path.resolve(__dirname, '..', '..'),
      npmPackage: options.cli ? options.cli.npmPackage : 'ember-cli'
    });
  
    var project = Project.projectOrnullProject(ui, cli);
  
    var environment = {
      tasks:    tasks,
      cliArgs:  options.cliArgs,
      commands: commands,
      project:  project,
      settings: defaultUpdateCheckerOptions
    };
  
    return cli.run(environment);
  };
  