<commit_before>'use strict';

module.exports = function (grunt) {

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            gruntfile: {
                src: 'Gruntfile.js'
            },
            test: {
                src: ['test/**/*.js']
            }
        },
        watch: {
            gruntfile: {
                files: '<%= jshint.gruntfile.src %>',
                tasks: ['jshint:gruntfile']
            },
            test: {
                files: '<%= jshint.test.src %>',
                tasks: ['jshint:test', 'karma:all']
            }
        },
        karma: {
            options: {
                configFile: 'karma.conf.js'
            },
            all: {
                singleRun: true,
                reporters: 'dots'
            }
        },
        cucumberjs: {
            src: 'test/acceptance/features/',
            options: {
                steps: 'test/acceptance/features/step_definitions/',
                format: 'pretty'
            }
        },
        mochacov: {
            options: {
                reporter: 'spec',
                ui: 'bdd'
            },
            all: ['test/unit/server/**/*.spec.js']
        }
    });

    // These plugins provide necessary tasks.
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-karma');
    grunt.loadNpmTasks('grunt-mocha-cov');
    grunt.loadNpmTasks('grunt-cucumber');

    // Default task.
    grunt.registerTask('default', ['jshint']);
    grunt.registerTask('test', ['test:server', 'test:ui']);
    grunt.registerTask('test:server', ['jshint', 'mochacov:all']);
    grunt.registerTask('test:ui', ['jshint', 'karma']);
    grunt.registerTask('bdd', ['cucumberjs']);
};<commit_msg>Updated grunt tasks to allow for running both BDD and unit tests.<commit_after>'use strict';

module.exports = function (grunt) {

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            gruntfile: {
                src: 'Gruntfile.js'
            },
            test: {
                src: ['test/**/*.js']
            }
        },
        watch: {
            gruntfile: {
                files: '<%= jshint.gruntfile.src %>',
                tasks: ['jshint:gruntfile']
            },
            test: {
                files: '<%= jshint.test.src %>',
                tasks: ['jshint:test', 'karma:all']
            }
        },
        karma: {
            options: {
                configFile: 'karma.conf.js'
            },
            all: {
                singleRun: true,
                reporters: 'dots'
            }
        },
        cucumberjs: {
            src: 'test/acceptance/features/',
            options: {
                steps: 'test/acceptance/features/step_definitions/',
                format: 'pretty'
            }
        },
        mochacov: {
            options: {
                reporter: 'spec',
                ui: 'bdd'
            },
            all: ['test/unit/server/**/*.spec.js']
        }
    });

    // These plugins provide necessary tasks.
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-karma');
    grunt.loadNpmTasks('grunt-mocha-cov');
    grunt.loadNpmTasks('grunt-cucumber');

    // Default task.
    grunt.registerTask('default', ['jshint']);
    grunt.registerTask('test', ['bdd', 'unit:server', 'unit:ui']);
    grunt.registerTask('unit:server', ['jshint', 'mochacov:all']);
    grunt.registerTask('unit:ui', ['jshint', 'karma']);
    grunt.registerTask('bdd', ['cucumberjs']);
};
{'fraction_non_alphanumeric': 0.15645371577574968, 'fraction_numerical': 0.0, 'mean_word_length': 1.4309252217997466, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6382507', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1163, 'n_words': 172}