Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Run QUnit tests in the Node.js environment.
JavaScript CoffeeScript
branch: master

Merge pull request #3 from fyockm/master

Add README, updates for JSHint, bump package numbers
latest commit dbf7fe286d
@tbranyen authored

README.md

grunt-nodequnit

A Grunt task for running running QUnit tests in the Node.js environment, leveraging node-qunit.


Technologies

  • Grunt: a JavaScript Task Runner.
  • Node-Qunit : a Qunit testing framework for Node.js
  • QUnit : a powerful, easy-to-use JavaScript unit test suite used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code, including itself!

Usage

npm i -D grunt-nodequnit

In Gruntfile.js:

grunt.loadNpmTasks('grunt-nodequnit');

grunt.initConfig({
    nodequnit: {
        // options, see below...
    }
};

Options

  • timeout: Default PhantomJS timeout
  • log: Logging options - all are off by default
  • coverage: Run istanbul code coverage
  • deps: Injectable dependencies, which are required before code
  • code: Where the code is located, default to current directory
  • label: Label for test

Example (with defaults)

grunt.initConfig({
    //....
    nodequnit: {
      timeout: 5000,
      log: {
        assertions: false,
        errors: false,
        tests: false,
        summary: false,
        globalSummary: false,
        testing: false,
      },
      coverage: false,
      deps: [],
      code: ".",
      label: "node.js",
    },
    // ....
});
Something went wrong with that request. Please try again.