<commit_before>/*
 * grunt-contrib-jasmine-node
 * https://github.com/tsakuma/grunt-contrib-jasmine-node
 *
 * Copyright (c) 2013 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

  var addOption = function (options, optionName) {
    if (grunt.config('jasmine-node.options.' + optionName)) {
      options.push("--" + optionName);
    }
  },
  addOptionsList = function (list) {
    var i = 0, 
      l = list.length,
      result = [];

    for (i = 0; i < l; i += 1) {
      addOption(result, list[i]);
    }

    return result;
  };

  // Please see the Grunt documentation for more information regarding task
  // creation: http://gruntjs.com/creating-tasks

  grunt.registerTask('jasmine-node', '', function() {
    grunt.config.requires('jasmine-node.run.spec');

    var options = [];
    if (grunt.config('jasmine-node.options.coffee')) {
      options.push("--coffee");
    }
    if (grunt.config('jasmine-node.options.noStack')) {
      options.push("--noStack");
    }
    
    options.push(grunt.config('jasmine-node.run.spec'));<commit_msg>Using `addOption` and `addOptionsList` to automatically check and add properties. Added support for all properties in `jasmine-node` module<commit_after>/*
 * grunt-contrib-jasmine-node
 * https://github.com/tsakuma/grunt-contrib-jasmine-node
 *
 * Copyright (c) 2013 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

  var addOption = function (options, optionName) {
    if (grunt.config('jasmine-node.options.' + optionName)) {
      options.push("--" + optionName);
    }
  },
  addOptionsList = function (list) {
    var i = 0, 
      l = list.length,
      result = [];

    for (i = 0; i < l; i += 1) {
      addOption(result, list[i]);
    }

    return result;
  };

  // Please see the Grunt documentation for more information regarding task
  // creation: http://gruntjs.com/creating-tasks

  grunt.registerTask('jasmine-node', '', function() {
    grunt.config.requires('jasmine-node.run.spec');

    var options = addOptionsList([
      'coffee',
      'color',
      'noColor',
      'verbose',
      'junitreport',
      'runWithRequireJs',
      'requireJsSetup',
      'nohelpers',
      'forceexit',
      'captureExceptions',
      'noStack'
    ]);

    options.push(grunt.config('jasmine-node.run.spec'));
{'fraction_non_alphanumeric': 0.15824915824915825, 'fraction_numerical': 0.005892255892255892, 'mean_word_length': 2.8462783171521036, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1267789', 'n_tokens_mistral': 815, 'n_tokens_neox': 764, 'n_words': 162}