grunt-node-tap

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

npm install grunt-node-tap
26 downloads in the last day
93 downloads in the last week
163 downloads in the last month

grunt-node-tap

Build Status

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

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.

npm loves you