JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20969
  • Score
    100M100P100Q155507F

Run Nodeunit unit tests.

Package Exports

  • grunt-contrib-nodeunit

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (grunt-contrib-nodeunit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

grunt-contrib-nodeunit Build Status

Run Nodeunit unit tests.

Note that this plugin has not yet been released, and only works with the latest bleeding-edge, in-development version of grunt. See the When will I be able to use in-development feature 'X'? FAQ entry for more information.

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:

npm install grunt-contrib-nodeunit --save-dev

Nodeunit task

Run this task with the grunt nodeunit command.

This task is a [multi task][] so any targets, files and options should be specified according to the [multi task][] documentation. [multi task]: https://github.com/gruntjs/grunt/wiki/Configuring-tasks

This plugin provides server-side JavaScript unit testing via nodeunit. If you're looking to test JavaScript that uses window or the DOM, please use the grunt-contrib-qunit pluginqunit task.

Usage examples

Wildcards

In this example, grunt nodeunit:all (or grunt nodeunit because nodeunit is a [multi task][]) will test all files ending with _test.js in the test directory.

// Project configuration.
grunt.initConfig({
  nodeunit: {
    all: ['test/*_test.js']
  }
});

With a slight modification, grunt nodeunit:all will test files matching the same pattern in the test directory and all subdirectories.

// Project configuration.
grunt.initConfig({
  nodeunit: {
    all: ['test/**/*_test.js']
  }
});

See the file globbing documentation for more details on wildcard patterns.

Release History

  • 2012-11-12   v0.1.1   Switch to this.file api internally.
  • 2012-11-03   v0.1.0   Work in progress, not yet officially released.

Task submitted by "Cowboy" Ben Alman

This file was generated on Wed Nov 28 2012 08:52:52.