<commit_before>grunt mocha istanbul task
==============

[Mocha](http://visionmedia.github.com/mocha/) reporter to generate coverage report of [istanbul](http://gotwarlost.github.com/istanbul/) instrumented code, for grunt
This doesn't force you to use PhantomJS, or instrument code for server or client-side.

Install
==============

1. Install it using `npm install grunt-mocha-istanbul --save-dev`
2. It needs `mocha` and `grunt` to be installed locally on your project (aka, having them in your devDependencies)
3. Call inside Gruntfile.js `grunt.loadNpmTasks('grunt-mocha-istanbul')`

Options
==============

Most of the options that you pass to mocha is available in `options`:

```js

module.exports = function(grunt){
    grunt.initConfig({
        mocha_istanbul: {
            coverage: {
                src: 'test', // the folder, not the files,
                options: {
                    mask: '*.spec.js'
                }
            },
            coveralls: {
                src: 'test', // the folder, not the files
                options: {
                    coverage:true
                }
            }
        }
    });

    grunt.event.on('coverage', function(lcovFileContents, done){
        // Check below
        done();
    });

    grunt.loadNpmTasks('grunt-mocha-istanbul');

    grunt.registerTask('coveralls', ['mocha_istanbul:coveralls']);
    grunt.registerTask('coverage', ['mocha_istanbul:coverage']);
};
```

If there's a `mocha.opts` file inside the `src`, it will warn if you are overwritting any options.

Coverage is written to `coverage` folder, in the same level as the `Gruntfile.js`

Options
==============
<commit_msg>documentation<commit_after>grunt mocha istanbul task
==============

[Mocha](http://visionmedia.github.com/mocha/) reporter to generate coverage report of [istanbul](http://gotwarlost.github.com/istanbul/) instrumented code, for grunt
This doesn't force you to use PhantomJS, or instrument code for server or client-side.

Install
==============

1. Install it using `npm install grunt-mocha-istanbul --save-dev`
2. It needs `mocha` and `grunt` to be installed locally on your project (aka, having them in your devDependencies)
3. Call inside Gruntfile.js `grunt.loadNpmTasks('grunt-mocha-istanbul')`

Options
==============

Most of the options that you pass to mocha is available in `options`:

```js

module.exports = function(grunt){
    grunt.initConfig({
        mocha_istanbul: {
            coverage: {
                src: 'test', // the folder, not the files,
                options: {
                    mask: '*.spec.js'
                }
            },
            coveralls: {
                src: 'test', // the folder, not the files
                options: {
                    coverage:true
                }
            }
        },
        mocha_istanbul_check: {
           options: {
                lines: 75,
                statements: 75
           }
        }
    });

    grunt.event.on('coverage', function(lcovFileContents, done){
        // Check below
        done();
    });

    grunt.loadNpmTasks('grunt-mocha-istanbul');

    grunt.registerTask('coveralls', ['mocha_istanbul:coveralls']);
    grunt.registerTask('coverage', ['mocha_istanbul:coverage']);
    grunt.registerTask('check-coverage', ['mocha_istanbul_check']);
};
```

If there's a `mocha.opts` file inside the `src`, it will warn if you are overwritting any options.

Coverage is written to `coverage` folder, in the same level as the `Gruntfile.js`

The `mocha_istanbul_check` task will fail the build if the thresholds are not met. It's a great possibility for CI-builds.

Options
==============

{'fraction_non_alphanumeric': 0.13678474114441416, 'fraction_numerical': 0.0027247956403269754, 'mean_word_length': 2.4895437262357416, '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': '6085859', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1042, 'n_words': 317}