0.2.0 • Published 11 years ago

grunt-nodequnit v0.2.0

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

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",
    },
    // ....
});
0.2.0

11 years ago

0.1.0

11 years ago