Code Monkey home page Code Monkey logo

grunt-contrib-nodeunit's Introduction

grunt-contrib-nodeunit Build Status

Run Nodeunit unit tests.

Getting Started

This plugin requires Grunt ~0.4.0

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, you may install this plugin with this command:

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

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

grunt.loadNpmTasks('grunt-contrib-nodeunit');

Nodeunit task

Run this task with the grunt nodeunit command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

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']
  }
});

Release History

  • 2013-02-14   v0.1.2   First official release for Grunt 0.4.0.
  • 2013-01-17   v0.1.2rc6   Updating grunt/gruntplugin dependencies to rc6. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.
  • 2013-01-08   v0.1.2rc5   Updating to work with grunt v0.4.0rc5. Switching to this.filesSrc api.
  • 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 Feb 20 2013 12:36:00.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.