A Grunt task to run node-tap tests and read their output.


Keywords
gruntplugin
License
ISC
Install
npm install grunt-node-tap@1.0.0

Documentation

grunt-node-tap

Grunt task to run node-tap tests and read their output.

NPM

Build Status Dependency Status

Example

grunt.initConfig({
    node_tap: {
      default_options: {
          options: {
              outputType: 'failures', // tap, failures, stats
              outputTo: 'console' // or file
              // outputFilePath: '/tmp/out.log' // path for output file, 
              // only makes sense with outputTo 'file'
          },
          files: {
              'tests': ['./test/data/*.js']
          }
      }
    }
})

Getting Started

This plugin requires Grunt ~0.4.1

npm install grunt-node-tap --save-dev

One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-node-tap');

Options

options.outputType

Specifies the type of output, 'failures', 'stats', or 'tap' (default is 'failures'), the screenshots below might help.

options.outputType: stats

stats outputMode

options.outputType: failures

failures outputMode

options.outputType: tap

tap outputMode

options.outputTo

Where to write output, the 'console' or a 'file'. Defaults to 'console'.

options.outputFilePath

Path to output file, this defaults to null and only makes sense if outputTo is set to 'file'

Fun note:

I imagine an outputType of 'tap' with an outputTo of 'file' might make this work with CI software.

Contributors

Here's a list, thanks for your help!