<commit_before>'use strict';

var fs = require('fs');
var path = require('path');
var util = require('util');
var yeoman = require('yeoman-generator');

var KarmaGenerator = module.exports = function KarmaGenerator(args, options) {
  yeoman.generators.Base.apply(this, arguments);
  this.sourceRoot(path.join(__dirname, '../../', 'templates'));
  this.testFramework = options['test-framework'] || 'jasmine';

  // Provide the default components from prior releases for backwards compat.
  this.components = options.components || [
    'angular/angular.js',
    'angular/angular-mocks.js'
  ];

  if (options.coffee) {
    this.format = 'coffee';
  } else {
    this.format = 'js';
  }

  this.on('end', function () {
    if (!options['skip-install']) {
      this.npmInstall(['grunt-karma', 'karma-ng-html2js-preprocessor', 'karma-ng-scenario'], {
        saveDev: true
      });
    }
  });
};

util.inherits(KarmaGenerator, yeoman.generators.Base);

KarmaGenerator.prototype.setupEnv = function setupEnv() {
  this.testPath = this.options.testPath ? this.options.testPath : 'test';
  
  this.template('karma.conf.js', 'karma.conf.js');
  this.template('karma-e2e.conf.js', 'karma-e2e.conf.js');
};

KarmaGenerator.prototype.setupTravis = function setupTravis() {
  if (!this.options.travis) {
    return;
  }

  var done = this.async();<commit_msg>generator-angular-633 - add missing dependencies to fix grunt test execution<commit_after>'use strict';

var fs = require('fs');
var path = require('path');
var util = require('util');
var yeoman = require('yeoman-generator');

var KarmaGenerator = module.exports = function KarmaGenerator(args, options) {
  yeoman.generators.Base.apply(this, arguments);
  this.sourceRoot(path.join(__dirname, '../../', 'templates'));
  this.testFramework = options['test-framework'] || 'jasmine';

  // Provide the default components from prior releases for backwards compat.
  this.components = options.components || [
    'angular/angular.js',
    'angular/angular-mocks.js'
  ];

  if (options.coffee) {
    this.format = 'coffee';
  } else {
    this.format = 'js';
  }

  this.on('end', function () {
    if (options['skip-install']) {
      return;
    }

    var packagesToBeInstalled = ['grunt-karma', 'karma-ng-html2js-preprocessor', 'karma-ng-scenario', 'karma-phantomjs-launcher']

    if(this.testFramework === 'jasmine') {
      packagesToBeInstalled.push('karma-jasmine');
    }

    this.npmInstall(packagesToBeInstalled, {
      saveDev: true
    });
  });
};

util.inherits(KarmaGenerator, yeoman.generators.Base);

KarmaGenerator.prototype.setupEnv = function setupEnv() {
  this.testPath = this.options.testPath ? this.options.testPath : 'test';
  
  this.template('karma.conf.js', 'karma.conf.js');
  this.template('karma-e2e.conf.js', 'karma-e2e.conf.js');
};

KarmaGenerator.prototype.setupTravis = function setupTravis() {
  if (!this.options.travis) {
    return;
  }

  var done = this.async();
{'fraction_non_alphanumeric': 0.16717428087986463, 'fraction_numerical': 0.003045685279187817, 'mean_word_length': 3.902155887230514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3279745', 'n_tokens_mistral': 993, 'n_tokens_neox': 969, 'n_words': 173}