<commit_before># grunt-ghost

Grunt task to run [CasperJS](http://casperjs.org/) tests

## Getting Started
Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-ghost`

Then add this line to your project's `grunt.js` gruntfile:

```javascript
grunt.loadNpmTasks('grunt-ghost');
```

[grunt]: http://gruntjs.com/
[getting_started]: https://github.com/gruntjs/grunt/blob/master/docs/getting_started.md

## Documentation
####Basic use without options
Add the filepaths of the tests you want to run in the "files" array. Files will be run in alphabetic and numerical order, below I have used a file naming convention that makes running files in correct order easier.
```javascript
ghost: {
  files: ['tests/1_userLogin.js','tests/2_userLogout']
}
```
#### Using options
I have included all the test command options listed in the [documentation]( http://casperjs.org/testing.html#casper-test-command) and some options of my own.
```javascript
ghost: {
    files: ['tests/userSuite/*.js'],
    options: {
        //CasperJS test command options
        xunit: 'xunit/userSuite.xml',  // Exports results of test to a xUnit XML file
        direct: true,                  // Outputs additional log messages
        logLevel: 'info',              // Sets logging level, check out http://casperjs.org/logging.html
        includes: [                    // Specifies files to be included for each test file
            'tests/config.js',
            'lib/jquery.min.js'
        ],
        pre: ['tests/pre-test.js'],     // Adds tests from specified files before running the test suite
        post: ['tests/post-test.js'],   // Adds tests from specified files after running the test suite
        failFast: true,                 // Terminates test suite upon failure of first test
        
        // grunt-ghost specific options
        printCommand: true,   // Prints command sent to CasperJS
        hideFilePaths: true  // Tells ghost to not print list of filepaths<commit_msg>Fixed char length of sample code for npm<commit_after># grunt-ghost

Grunt task to run [CasperJS](http://casperjs.org/) tests

## Getting Started
Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-ghost`

Then add this line to your project's `grunt.js` gruntfile:

```javascript
grunt.loadNpmTasks('grunt-ghost');
```

[grunt]: http://gruntjs.com/
[getting_started]: https://github.com/gruntjs/grunt/blob/master/docs/getting_started.md

## Documentation
####Basic use without options
Add the filepaths of the tests you want to run in the "files" array. Files will be run in alphabetic and numerical order, below I have used a file naming convention that makes running files in correct order easier.
```javascript
ghost: {
  files: ['tests/1_userLogin.js','tests/2_userLogout']
}
```
#### Using options
I have included all the test command options listed in the [documentation]( http://casperjs.org/testing.html#casper-test-command) and some options of my own.
```javascript
ghost: {

    files: ['tests/userSuite/*.js'],

    //CasperJS test command options
    options: {
        // Exports results of test to a xUnit XML file
        xunit: 'xunit/userSuite.xml',
        // Outputs additional log messages
        direct: true,
        // Sets logging level, check out http://casperjs.org/logging.html
        logLevel: 'info',
        // Specifies files to be included for each test file
        includes: [
            'tests/config.js',
            'lib/jquery.min.js'
        ],
        // Adds tests from specified files before running the test suite
        pre: ['tests/pre-test.js'],
        // Adds tests from specified files after running the test suite
        post: ['tests/post-test.js'],
        // Terminates test suite upon failure of first test
        failFast: true,
        
        // grunt-ghost specific options
        // Prints command sent to CasperJS
        printCommand: true,
        // Tells ghost to not print list of filepaths
        hideFilePaths: true
{'fraction_non_alphanumeric': 0.1034313725490196, 'fraction_numerical': 0.000980392156862745, 'mean_word_length': 2.8463713477851083, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '3032688', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1134, 'n_words': 422}