<commit_before># wallabify

Wallaby.js postprocessor to support browserify.

## Installation

``` sh
npm install wallabify --save-dev
```

## Usage

``` javascript
// Wallaby.js configuration

var wallabify = require('wallabify');
var wallabyPostprocessor = wallabify({
    // browserify options, such as
    // insertGlobals: false
  }
  // you may also pass an initializer function to chain other 
  // browserify options, such as transformers
  // , b => b.exclude('mkdirp').transform(require('babelify'))
);

module.exports = function () {
  return {
    // set `load: false` to all of the browserified source files and tests,
    // as they should not be loaded in browser, 
    // their browserified versions will be loaded instead
    files: [
      {pattern: 'src/*.js', load: false}
    ],

    tests: [
      {pattern: 'test/*Spec.js', load: false}
    ],
    
    postprocessor: wallabyPostprocessor,

    bootstrap: function () {
      // required to trigger tests loading 
      window.__moduleBundler.loadTests();
    }
  };
};
```

## Notes

### Browserify options
Only specify options that you need for your tests to run to avoid doing anything that would make each test run slower. 

You don't need to specify any output options because wallabify doesn't use concatenated bundle. While concatenating files is beneficial for a production environment, in a testing environment it is different.
 Serving a large bundle every time when one of many files (that the bundle consists of) changes, is wasteful.<commit_msg>Added a note about ignoring not tested dependencies<commit_after># wallabify

Wallaby.js postprocessor to support browserify.

## Installation

``` sh
npm install wallabify --save-dev
```

## Usage

``` javascript
// Wallaby.js configuration

var wallabify = require('wallabify');
var wallabyPostprocessor = wallabify({
    // browserify options, such as
    // insertGlobals: false
  }
  // you may also pass an initializer function to chain other 
  // browserify options, such as transformers
  // , b => b.exclude('mkdirp').transform(require('babelify'))
);

module.exports = function () {
  return {
    // set `load: false` to all of the browserified source files and tests,
    // as they should not be loaded in browser, 
    // their browserified versions will be loaded instead
    files: [
      {pattern: 'src/*.js', load: false}
    ],

    tests: [
      {pattern: 'test/*Spec.js', load: false}
    ],
    
    postprocessor: wallabyPostprocessor,

    bootstrap: function () {
      // required to trigger tests loading 
      window.__moduleBundler.loadTests();
    }
  };
};
```

## Notes

### Browserify options
To make your tests run as fast as possible, only specify options that you need for your tests to run to avoid doing anything that would make each test run slower. When possible, consider using `b.ignore(file)` for dependencies that you don't test and that you tests don't depend on.

You don't need to specify any output options because wallabify doesn't use concatenated bundle. While concatenating files is beneficial for a production environment, in a testing environment it is different.
 Serving a large bundle every time when one of many files (that the bundle consists of) changes, is wasteful.
{'fraction_non_alphanumeric': 0.09260962894817541, 'fraction_numerical': 0.0, 'mean_word_length': 3.4200542005420056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2288850', 'n_tokens_mistral': 905, 'n_tokens_neox': 857, 'n_words': 373}