<commit_before># godaddy-test-tools

`gulp` tools for testing node libraries with mocha and istanbul as well as linting using [`godaddy-style`](https://github.com/godaddy/javascript).

### Usage
```
npm install --save-dev godaddy-test-tools
```

... add the package to your `gulpfile.js`
```js
'use strict';

var gulp = require('gulp');
require('godaddy-test-tools')(gulp, {
  // change any of the options listed below as needed
});

// define other gulp tasks or override already defined tasks as desired
```

... or `gulpfile.babel.js` if you are using ES6
```js
import testTools from 'godaddy-test-tools';
import gulp from 'gulp';

testTools(gulp, {
  // change any of the options listed below as needed
});

```

Running `gulp help` will show all the tasks and a description (if provided) for each of the tasks.


### Options
 - es6: Specifies that your code is written in ES6 (+ JSX). You must also name your gulpfile `gulpfile.babel.js`. Defaults to `true`.
 - junit: Use junit reporting for the currently run task and output to the specified file. If has a string value, it will be interpretted
   as the file where the results should be written, if simply present, the argument will trigger the junit default file at
   `./build/test/*-results.xml`. This options is currently supported by unit, integration, eslint and respective coverage tasks.
 - allowUnhandledRejections: The test tools will not throw an exception when a promise has an unresolved rejection. Defaults to `false`.
 - sourceFiles: The source files that will be watched and code coverage. default: `lib/**/*.js`
 - unitTestFiles: A glob-able path(s) to all the unit test files. default: `test/unit/**/*.js`
 - integrationTestFiles: A glob-able path(s) to all the integration test files. defaut: `test/integration/**/*.js`
 - istanbul: Options for [`gulp-istanbul`](https://www.npmjs.com/package/gulp-istanbul)
 - mocha: Options for [`gulp-mocha`](https://www.npmjs.com/package/gulp-mocha)
 - watchFiles: default: `[sourceFiles, unitTestFiles, integrationTestFiles]`
 - shrinkwrap:
    - removeExisting: remove the existing files by default, default: true
    - onlyFormat: only remove the artifacts from the existing npm-shrinkwrap.json file, default: false
    - dev: include devDependencies in shrinkwrap, default: true
 - lint:
    - filenameConvention: example: `{ type: (kebob, snake, camel), exclude: /regex/, files: ['lib/**/*.js', 'test/**/*.js'] }`
    - files: a list of glob-able file paths to include in the lint checks.
        default:
        ```js
          [
            sourceFiles,
            unitTestFiles,
            integrationTestFiles,
            'index.js',
            'main.js',
            'gulpfile.js',
            'gulpfile.babel.js',
            'config/**/*.json',<commit_msg>Change docs<commit_after># godaddy-test-tools

`gulp` tools for testing node libraries with mocha and istanbul as well as linting using [`godaddy-style`](https://github.com/godaddy/javascript).

### Usage
```
npm install --save-dev godaddy-test-tools
```

... add the package to your `gulpfile.js`
```js
'use strict';

var gulp = require('gulp');
require('godaddy-test-tools')(gulp, {
  // change any of the options listed below as needed
});

// define other gulp tasks or override already defined tasks as desired
```

... or `gulpfile.babel.js` if you are using ES6
```js
import testTools from 'godaddy-test-tools';
import gulp from 'gulp';

testTools(gulp, {
  // change any of the options listed below as needed
});

```

Running `gulp help` will show all the tasks and a description (if provided) for each of the tasks.


### Options
 - es6: Specifies that your code is written in ES6 (+ JSX). You must also name your gulpfile `gulpfile.babel.js`. Defaults to `true`.
 - junit: Use junit reporting for the currently run task and output to the specified file. If has a string value, it will be interpretted
   as the file where the results should be written, if simply present, the argument will trigger the junit default file at
   `./build/test/*-results.xml`. This options is currently supported by unit, integration, eslint and respective coverage tasks.
 - allowUnhandledRejections: The test tools will not throw an exception when a promise has an unresolved rejection. Defaults to `false`.
 - sourceFiles: The source files that will be watched and code coverage. default: `lib/**/*.js`
 - unitTestFiles: A glob-able path(s) to all the unit test files. default: `test/unit/**/*.js`
 - integrationTestFiles: A glob-able path(s) to all the integration test files. defaut: `test/integration/**/*.js`
 - istanbul: Options for [`gulp-istanbul`](https://www.npmjs.com/package/gulp-istanbul)
 - mocha: Options for [`gulp-mocha`](https://www.npmjs.com/package/gulp-mocha)
 - watchFiles: default: `[sourceFiles, unitTestFiles, integrationTestFiles]`
 - shrinkwrap:
    - removeExisting: remove the existing files by default, default: false
    - onlyFormat: only remove the artifacts from the existing npm-shrinkwrap.json file, default: false
    - dev: include devDependencies in shrinkwrap, default: true
 - lint:
    - filenameConvention: example: `{ type: (kebob, snake, camel), exclude: /regex/, files: ['lib/**/*.js', 'test/**/*.js'] }`
    - files: a list of glob-able file paths to include in the lint checks.
        default:
        ```js
          [
            sourceFiles,
            unitTestFiles,
            integrationTestFiles,
            'index.js',
            'main.js',
            'gulpfile.js',
            'gulpfile.babel.js',
            'config/**/*.json',
{'fraction_non_alphanumeric': 0.1180692625157007, 'fraction_numerical': 0.0010766194150367845, 'mean_word_length': 3.34789391575663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, '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': '3033417', 'n_tokens_mistral': 1659, 'n_tokens_neox': 1595, 'n_words': 626}